cpython/Objects
Bénédikt Tran fa985bee61
gh-127787: refactor helpers for PyUnicodeErrorObject internal interface (GH-127789)
- Unify `get_unicode` and `get_string` in a single function.

- Allow to retrieve the underlying `object` attribute, its
  size, and the adjusted 'start' and 'end', all at once.
  Add a new `_PyUnicodeError_GetParams` internal function for this.
  (In `exceptions.c`, it's somewhat common to not need all the attributes,
  but the compiler has opportunity to inline the function and optimize
  unneeded work away. Outside that file, we'll usually need all or
  most of them at once.)

- Use a common implementation for the following functions:

  - `PyUnicode{Decode,Encode}Error_GetEncoding`
  - `PyUnicode{Decode,Encode,Translate}Error_GetObject`
  - `PyUnicode{Decode,Encode,Translate}Error_{Get,Set}Reason`
  - `PyUnicode{Decode,Encode,Translate}Error_{Get,Set}{Start,End}`
2025-01-03 13:37:02 +01:00
..
clinic gh-125420: implement Sequence.count API on memoryview objects (#125443) 2024-12-10 10:12:33 +00:00
mimalloc gh-123826: Fix unused function warnings in mimalloc on NetBSD (#123827) 2024-09-09 13:22:28 -04:00
stringlib gh-122943: Add the varpos parameter in _PyArg_UnpackKeywords (GH-126564) 2024-11-08 14:23:50 +02:00
abstract.c GH-127058: Make PySequence_Tuple safer and probably faster. (#127758) 2024-12-11 14:02:59 +00:00
boolobject.c gh-122982: Extend the deprecation period for bool inversion by two years (#123306) 2024-08-25 12:24:44 -07:00
bytearrayobject.c gh-126980: Fix bytearray.__buffer__ crash on PyBUF_{READ,WRITE} (#126981) 2024-11-19 17:44:53 +03:00
bytes_methods.c gh-121165: protect macro expansion of ADJUST_INDICES with do-while(0) (#121166) 2024-07-02 16:27:51 +05:30
bytesobject.c gh-128133: use relaxed atomics for hash of bytes (#128412) 2025-01-03 13:50:56 +05:30
call.c gh-106320: Remove _PyFunction_Vectorcall() API (#107071) 2023-07-22 21:44:33 +00:00
capsule.c gh-124538: Fix crash when using gc.get_referents on an untracked capsule object (#124559) 2024-09-26 12:29:43 +02:00
cellobject.c gh-127271: Replace use of PyCell_GET/SET (gh-127272) 2024-12-03 10:33:06 -08:00
classobject.c gh-111178: Fix function signatures in classobject.c (#124943) 2024-10-04 12:00:00 +02:00
codeobject.c GH-122548: Implement branch taken and not taken events for sys.monitoring (GH-122564) 2024-12-19 16:59:51 +00:00
complexobject.c gh-120010: Fix invalid (nan+nanj) results in _Py_c_prod() (GH-120287) 2024-12-06 12:28:32 +02:00
descrobject.c bpo-24766: doc= argument to subclasses of property not handled correctly (GH-2487) 2024-06-10 08:55:49 +00: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 gh-115999: Specialize STORE_ATTR in free-threaded builds. (gh-127838) 2024-12-19 10:21:17 -08:00
enumobject.c gh-106320: Create pycore_modsupport.h header file (#106355) 2023-07-03 09:39:11 +00:00
exceptions.c gh-127787: refactor helpers for PyUnicodeErrorObject internal interface (GH-127789) 2025-01-03 13:37:02 +01:00
fileobject.c Replace PyObject_Del with PyObject_Free (#122453) 2024-08-01 14:12:33 +02:00
floatobject.c gh-69639: Add mixed-mode rules for complex arithmetic (C-like) (GH-124829) 2024-11-26 17:57:39 +02:00
frameobject.c gh-128198: Add missing error checks for usages of PyIter_Next() (GH-128199) 2024-12-25 19:42:04 +02:00
funcobject.c gh-127274: Defer nested methods (#128012) 2024-12-19 13:03:14 -08:00
genericaliasobject.c gh-119180: Add evaluate functions for type params and type aliases (#122212) 2024-07-27 17:24:10 +00:00
genobject.c gh-126491: Revert "GH-126491: Lower heap size limit with faster marking (GH-127519)" (GH-127770) 2024-12-10 11:53:56 +01:00
iterobject.c gh-106320: Remove private _PyEval function (#108433) 2023-08-24 20:25:22 +02:00
listobject.c Clean up redundant ifdef in list getitem (#128257) 2024-12-26 14:40:48 +00:00
listsort.txt GH-116939: Rewrite binarysort() (#116940) 2024-03-21 22:27:25 -05:00
lnotab_notes.txt gh-119786: add code object doc, inline locations.md into it (#126832) 2024-11-22 19:27:41 +00:00
longobject.c gh-126868: Add freelist for compact ints to _PyLong_New (#128181) 2024-12-26 15:17:22 +00:00
memoryobject.c gh-127085: fix some data races in memoryview in free-threading (#127412) 2024-12-17 00:42:19 +05:30
methodobject.c gh-111178: Fix function signatures in methodobject.c (#124902) 2024-10-02 17:24:10 +02:00
moduleobject.c GH-127010: Don't lazily track and untrack dicts (GH-127027) 2024-11-20 16:41:20 +00:00
namespaceobject.c gh-128198: Add missing error checks for usages of PyIter_Next() (GH-128199) 2024-12-25 19:42:04 +02:00
object.c gh-128100: Use atomic dictionary load in _PyObject_GenericGetAttrWithDict (GH-128297) 2024-12-30 20:38:49 +00:00
object_layout.md GH-115776: Allow any fixed sized object to have inline values (GH-123192) 2024-08-21 15:52:04 +01:00
object_layout_312.gv GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115) 2024-04-02 11:59:21 +01:00
object_layout_312.png GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115) 2024-04-02 11:59:21 +01:00
object_layout_313.gv GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115) 2024-04-02 11:59:21 +01:00
object_layout_313.png GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115) 2024-04-02 11:59:21 +01:00
object_layout_full_312.gv GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
object_layout_full_312.png GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
object_layout_full_313.gv GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115) 2024-04-02 11:59:21 +01:00
object_layout_full_313.png GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115) 2024-04-02 11:59:21 +01:00
obmalloc.c gh-127314: Don't mention the GIL when calling without a thread state on the free-threaded build (#127315) 2024-12-06 16:58:19 +01:00
odictobject.c gh-119004: fix a crash in equality testing between OrderedDict (#121329) 2024-09-23 18:44:36 -05:00
picklebufobject.c gh-104922: remove PY_SSIZE_T_CLEAN (#106315) 2023-07-02 15:07:46 +09:00
rangeobject.c gh-111178: fix some USAN failures - mismatched function pointers (GH-123004) 2024-09-27 23:51:50 +02:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
setobject.c GH-126547: Pre-assign version numbers for a few common classes (GH-126551) 2024-11-08 16:44:44 +00:00
sliceobject.c gh-125063: Emit slices as constants in the bytecode compiler (#125064) 2024-10-08 13:18:39 -04:00
structseq.c GH-125174: Make immortal objects more robust, following design from PEP 683 (GH-125251) 2024-10-10 18:19:08 +01:00
tupleobject.c gh-126076: Account for relocated objects in tracemalloc (#126077) 2024-11-19 10:35:17 +00:00
typeobject.c gh-115999: Enable BINARY_SUBSCR_GETITEM for free-threaded build (gh-127737) 2024-12-19 11:08:17 +09:00
typeslots.inc gh-124153: Implement PyType_GetBaseByToken() and Py_tp_token slot (GH-124163) 2024-09-18 09:18:19 +02:00
typeslots.py gh-124153: Implement PyType_GetBaseByToken() and Py_tp_token slot (GH-124163) 2024-09-18 09:18:19 +02:00
typevarobject.c gh-119180: Add VALUE_WITH_FAKE_GLOBALS format to annotationlib (#124415) 2024-11-26 15:40:13 +00:00
unicodectype.c bpo-46670: Remove unused macros in the Objects directory (GH-31193) 2022-02-07 16:21:41 +01:00
unicodeobject.c gh-128212: Fix race in _PyUnicode_CheckConsistency (GH-128367) 2025-01-02 14:02:54 -05:00
unicodetype_db.h closes gh-124016: update Unicode to 16.0.0 (#124017) 2024-09-13 07:47:04 -07:00
unionobject.c gh-119180: Add evaluate functions for type params and type aliases (#122212) 2024-07-27 17:24:10 +00:00
weakrefobject.c gh-128008: Add PyWeakref_IsDead() (GH-128009) 2024-12-19 16:17:15 +01:00

Source files for various builtin objects