mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-24 21:55:26 +00:00
Massive automated renaming of all Py_/PyObject/etc. prefixes to Ty_/TyObject/etc. This includes: - All public API types (TyObject, TyTypeObject, etc.) - All public API functions (Ty_Initialize, Ty_BuildValue, etc.) - All internal API (_Ty_ prefixes) - Reference counting macros (Ty_INCREF, Ty_DECREF, etc.) - Type flags (Ty_TPFLAGS_*) - Debug flags (Ty_DEBUG, Ty_TRACE_REFS, etc.) - All object type APIs (TyList_, TyDict_, TyUnicode_, etc.) This changes over 60,000 occurrences across 1000+ files. Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
32 lines
1.2 KiB
C
32 lines
1.2 KiB
C
/* this is sort of a hack. there's at least one place (formatting
|
|
floats) where some stringlib code takes a different path if it's
|
|
compiled as unicode. */
|
|
#define STRINGLIB_IS_UNICODE 1
|
|
|
|
#define FASTSEARCH ucs4lib_fastsearch
|
|
#define STRINGLIB(F) ucs4lib_##F
|
|
#define STRINGLIB_OBJECT PyUnicodeObject
|
|
#define STRINGLIB_SIZEOF_CHAR 4
|
|
#define STRINGLIB_MAX_CHAR 0x10FFFFu
|
|
#define STRINGLIB_CHAR Ty_UCS4
|
|
#define STRINGLIB_TYPE_NAME "unicode"
|
|
#define STRINGLIB_PARSE_CODE "U"
|
|
#define STRINGLIB_ISSPACE Ty_UNICODE_ISSPACE
|
|
#define STRINGLIB_ISLINEBREAK BLOOM_LINEBREAK
|
|
#define STRINGLIB_ISDECIMAL Ty_UNICODE_ISDECIMAL
|
|
#define STRINGLIB_TODECIMAL Ty_UNICODE_TODECIMAL
|
|
#define STRINGLIB_STR TyUnicode_4BYTE_DATA
|
|
#define STRINGLIB_LEN TyUnicode_GET_LENGTH
|
|
#define STRINGLIB_NEW _TyUnicode_FromUCS4
|
|
#define STRINGLIB_CHECK TyUnicode_Check
|
|
#define STRINGLIB_CHECK_EXACT TyUnicode_CheckExact
|
|
#define STRINGLIB_MUTABLE 0
|
|
#if SIZEOF_WCHAR_T == 4
|
|
#define STRINGLIB_FAST_MEMCHR(s, c, n) \
|
|
(Ty_UCS4 *)wmemchr((const wchar_t *)(s), c, n)
|
|
#endif
|
|
|
|
#define STRINGLIB_TOSTR PyObject_Str
|
|
#define STRINGLIB_TOASCII PyObject_ASCII
|
|
|