mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-25 06:05:05 +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>
29 lines
1.2 KiB
C
29 lines
1.2 KiB
C
#ifndef STRINGLIB_STRINGDEFS_H
|
|
#define STRINGLIB_STRINGDEFS_H
|
|
|
|
/* 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 0
|
|
|
|
#define FASTSEARCH fastsearch
|
|
#define STRINGLIB(F) stringlib_##F
|
|
#define STRINGLIB_OBJECT PyBytesObject
|
|
#define STRINGLIB_SIZEOF_CHAR 1
|
|
#define STRINGLIB_CHAR char
|
|
#define STRINGLIB_TYPE_NAME "string"
|
|
#define STRINGLIB_PARSE_CODE "S"
|
|
#define STRINGLIB_ISSPACE Ty_ISSPACE
|
|
#define STRINGLIB_ISLINEBREAK(x) ((x == '\n') || (x == '\r'))
|
|
#define STRINGLIB_ISDECIMAL(x) ((x >= '0') && (x <= '9'))
|
|
#define STRINGLIB_TODECIMAL(x) (STRINGLIB_ISDECIMAL(x) ? (x - '0') : -1)
|
|
#define STRINGLIB_STR TyBytes_AS_STRING
|
|
#define STRINGLIB_LEN TyBytes_GET_SIZE
|
|
#define STRINGLIB_NEW TyBytes_FromStringAndSize
|
|
#define STRINGLIB_CHECK TyBytes_Check
|
|
#define STRINGLIB_CHECK_EXACT TyBytes_CheckExact
|
|
#define STRINGLIB_TOSTR PyObject_Str
|
|
#define STRINGLIB_TOASCII PyObject_Repr
|
|
#define STRINGLIB_FAST_MEMCHR memchr
|
|
#endif /* !STRINGLIB_STRINGDEFS_H */
|