cpython/Objects
Victor Stinner c14d7e4b81
bpo-47164: Add _PyASCIIObject_CAST() macro (GH-32191)
Add macros to cast objects to PyASCIIObject*, PyCompactUnicodeObject*
and PyUnicodeObject*: _PyASCIIObject_CAST(),
_PyCompactUnicodeObject_CAST() and _PyUnicodeObject_CAST(). Using
these new macros make the code more readable and check their argument
with: assert(PyUnicode_Check(op)).

Remove redundant assert(PyUnicode_Check(op)) in macros using directly
or indirectly these new CAST macros.

Replacing existing casts with these macros.
2022-03-31 09:59:27 +02:00
..
clinic bpo-46841: Quicken code in-place (GH-31888) 2022-03-21 11:11:17 +00:00
stringlib bpo-46670: Define all macros for stringlib (GH-31176) 2022-02-07 01:26:58 +01:00
abstract.c bpo-46927: Include the type's name in the error message for subscripting non-generic types (GH-31694) 2022-03-05 15:59:24 +02:00
accu.c bpo-35081: Move accu.h to Include/internal/pycore_accu.h (GH-10271) 2018-11-01 02:30:36 +01:00
boolobject.c bpo-46765: Replace Locally Cached Strings with Statically Initialized Objects (gh-31366) 2022-02-22 17:23:51 -07:00
bytearrayobject.c bpo-47070: Add _PyBytes_Repeat() (GH-31999) 2022-03-28 04:43:45 -04:00
bytes_methods.c bpo-43179: Generalise alignment for optimised string routines (GH-24624) 2021-03-31 12:12:39 +02:00
bytesobject.c bpo-47070: Add _PyBytes_Repeat() (GH-31999) 2022-03-28 04:43:45 -04:00
call.c bpo-47162: Add call trampoline to mitigate bad fpcasts on Emscripten (GH-32189) 2022-03-30 12:28:33 -07:00
capsule.c bpo-45855: document that no_block has no use anymore in PyCapsule_Import (#29665) 2021-12-12 10:49:50 +01:00
cellobject.c bpo-40268: Remove unused pycore_pymem.h includes (GH-19531) 2020-04-15 02:57:50 +02:00
classobject.c bpo-46920: Remove code that has no explainer why it was disabled (GH-31814) 2022-03-14 17:02:32 +01:00
codeobject.c bpo-46841: Quicken code in-place (GH-31888) 2022-03-21 11:11:17 +00:00
complexobject.c bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized global objects. (gh-30928) 2022-02-08 13:39:07 -07:00
descrobject.c bpo-47162: Add call trampoline to mitigate bad fpcasts on Emscripten (GH-32189) 2022-03-30 12:28:33 -07:00
dictnotes.txt bpo-46845: Reduce dict size when all keys are Unicode (GH-31564) 2022-03-02 08:09:28 +09:00
dictobject.c bpo-47164: Add _PyASCIIObject_CAST() macro (GH-32191) 2022-03-31 09:59:27 +02:00
enumobject.c bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized global objects. (gh-30928) 2022-02-08 13:39:07 -07:00
exception_handling_notes.txt bpo-44525: Split calls into PRECALL and CALL (GH-30011) 2021-12-14 18:22:44 +00:00
exceptions.c bpo-46775: OSError should call winerror_to_errno unconditionally on Windows (GH-32179) 2022-03-30 18:31:33 +01:00
fileobject.c bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized global objects. (gh-30928) 2022-02-08 13:39:07 -07:00
floatobject.c bpo-46906: Add PyFloat_Pack8() to the C API (GH-31657) 2022-03-12 00:10:02 +01:00
frameobject.c bpo-42197: Don't create f_locals dictionary unless we actually need it. (GH-32055) 2022-03-25 12:57:50 +00:00
funcobject.c bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized global objects. (gh-30928) 2022-02-08 13:39:07 -07:00
genericaliasobject.c bpo-47067: Optimize calling GenericAlias objects (GH-31996) 2022-03-21 16:33:02 -04:00
genobject.c bpo-47045: Remove f_state field (GH-31963) 2022-03-22 12:57:19 +00:00
interpreteridobject.c bpo-35081: Move interpreteridobject.h to Include/internal/ (GH-28969) 2021-10-15 11:56:34 +02:00
iterobject.c bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized global objects. (gh-30928) 2022-02-08 13:39:07 -07:00
listobject.c bpo-39829: Fix __len__() is called twice in list() constructor (GH-31816) 2022-03-14 10:23:59 +09:00
listsort.txt Fix typos in the Objects directory (GH-28766) 2021-10-06 16:57:10 -07:00
lnotab_notes.txt bpo-44525: Split calls into PRECALL and CALL (GH-30011) 2021-12-14 18:22:44 +00:00
longobject.c bpo-46311: Clean up PyLong_FromLong and PyLong_FromLongLong (GH-30496) 2022-03-01 14:20:52 +00:00
memoryobject.c bpo-46670: Remove unused macros in the Objects directory (GH-31193) 2022-02-07 16:21:41 +01:00
methodobject.c bpo-47162: Add call trampoline to mitigate bad fpcasts on Emscripten (GH-32189) 2022-03-30 12:28:33 -07:00
moduleobject.c bpo-46891: Fix creating a new instance of a module subclass with slots (GH-31643) 2022-03-03 10:38:27 +00:00
namespaceobject.c bpo-45482: Rename namespaceobject.h to pycore_namespace.h (GH-28975) 2021-10-15 15:21:21 +02:00
object.c bpo-45786: Remove _PyFrame_Fini() and _PyFrame_DebugMallocStats() (GH-31874) 2022-03-18 11:16:55 +01:00
obmalloc.c bpo-46670: Remove unused macros in the Objects directory (GH-31193) 2022-02-07 16:21:41 +01:00
odictobject.c bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized global objects. (gh-30928) 2022-02-08 13:39:07 -07:00
picklebufobject.c bpo-36785: PEP 574 implementation (GH-7076) 2019-05-26 17:10:09 +02:00
rangeobject.c bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized global objects. (gh-30928) 2022-02-08 13:39:07 -07:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
setobject.c bpo-47164: Add _PyASCIIObject_CAST() macro (GH-32191) 2022-03-31 09:59:27 +02:00
sliceobject.c bpo-43268: Pass interp rather than tstate to internal functions (GH-24580) 2021-02-19 15:10:45 +01:00
structseq.c bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized global objects. (gh-30928) 2022-02-08 13:39:07 -07:00
tupleobject.c bpo-46753: Add the empty tuple to the _PyRuntimeState.global_objects. (gh-31345) 2022-02-28 15:15:48 -07:00
typeobject.c bpo-47164: Add _PyASCIIObject_CAST() macro (GH-32191) 2022-03-31 09:59:27 +02:00
typeslots.inc bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931) 2020-11-10 12:53:46 -08:00
typeslots.py bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931) 2020-11-10 12:53:46 -08:00
unicodectype.c bpo-46670: Remove unused macros in the Objects directory (GH-31193) 2022-02-07 16:21:41 +01:00
unicodeobject.c bpo-47164: Add _PyASCIIObject_CAST() macro (GH-32191) 2022-03-31 09:59:27 +02:00
unicodetype_db.h closes bpo-45190: Update Unicode data to version 14.0.0. (GH-28336) 2021-09-14 11:00:38 -07:00
unionobject.c bpo-46541: Replace core use of _Py_IDENTIFIER() with statically initialized global objects. (gh-30928) 2022-02-08 13:39:07 -07:00
weakrefobject.c bpo-46541: Discover the global strings. (gh-31346) 2022-02-14 17:36:51 -07:00

Source files for various builtin objects