File: _unicodedata2_compat.h

package info (click to toggle)
python-unicodedata2 15.1.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 496 kB
  • sloc: ansic: 1,523; python: 1,237; makefile: 14
file content (25 lines) | stat: -rw-r--r-- 696 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef __UNICODEDATA2_COMPAT_H__
#define __UNICODEDATA2_COMPAT_H__

/*
 * Compatibility shims
 */


/* ----------------------------------------------------------------------- *
 * Update for Python 3.11 - Contributed by Victor Stinner in bpo-39573.
 * Compatibility macro for older Python versions.
 * ----------------------------------------------------------------------- */
#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_TYPE)
static inline void _Py_SET_TYPE(PyObject *ob, PyTypeObject *type)
{ ob->ob_type = type; }
#define Py_SET_TYPE(ob, type) _Py_SET_TYPE((PyObject*)(ob), type)
#endif


#ifdef PYPY_VERSION
#include "pypy_ctype.h"
typedef Py_ssize_t Py_ssize_clean_t;
#endif

#endif