Zackery Spytz
6b6092f533
bpo-39075: types.SimpleNamespace no longer sorts attributes in its repr (GH-19430)
6 years ago
Victor Stinner
4a21e57fe5
bpo-40268: Remove unused structmember.h includes (GH-19530)
If only offsetof() is needed: include stddef.h instead.
When structmember.h is used, add a comment explaining that
PyMemberDef is used.
6 years ago
Andy Lester
dffe4c0709
bpo-39573: Finish converting to new Py_IS_TYPE() macro (GH-18601)
6 years ago
Victor Stinner
58ac700fb0
bpo-39573: Use Py_TYPE() macro in Objects directory (GH-18392)
Replace direct access to PyObject.ob_type with Py_TYPE().
6 years ago
Jeroen Demeyer
530f506ac9
bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464)
Automatically replace
tp_print -> tp_vectorcall_offset
tp_compare -> tp_as_async
tp_reserved -> tp_as_async
7 years ago
Serhiy Storchaka
a24107b04c
bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112)
7 years ago
Serhiy Storchaka
8905fcc85a
bpo-35454: Fix miscellaneous minor issues in error handling. ( #11077 )
* bpo-35454: Fix miscellaneous minor issues in error handling.
* Fix a null pointer dereference.
7 years ago
Peter Eisentraut
0e0bc4e221
Fix misleading mentions of tp_size in comments (GH-9093)
Many type object initializations labeled a field "tp_size" in the
comment, but the name of that field is tp_basicsize.
7 years ago
Siddhesh Poyarekar
55edd0c185
bpo-33012: Fix invalid function cast warnings with gcc 8 for METH_NOARGS. (GH-6030)
METH_NOARGS functions need only a single argument but they are cast
into a PyCFunction, which takes two arguments. This triggers an
invalid function cast warning in gcc8 due to the argument mismatch.
Fix this by adding a dummy unused argument.
8 years ago
Serhiy Storchaka
79ba471488
bpo-31655: Validate keyword names in SimpleNamespace constructor. ( #3909 )
8 years ago
Serhiy Storchaka
bf623ae884
bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() ( #1096 )
raised an error.
Replace them with using concrete types API that never fails if appropriate.
9 years ago
Benjamin Peterson
d39206a78c
use c++ style comments
9 years ago
Serhiy Storchaka
08d230a540
Issue #24257 : Fixed incorrect uses of PyObject_IsInstance().
Fixed segmentation fault in sqlite3.Row constructor with faked cursor type.
Fixed system error in the comparison of faked types.SimpleNamespace.
11 years ago
Victor Stinner
59799a8399
Don't use deprecated function PyUnicode_GET_SIZE()
Replace it with PyUnicode_GET_LENGTH() or PyUnicode_AsUnicodeAndSize()
12 years ago
Antoine Pitrou
9ed5f27266
Issue #18722 : Remove uses of the "register" keyword in C code.
13 years ago
Victor Stinner
9d77664e01
Issue #9566 : Fix a compiler warning on Windows 64-bit in namespace_init()
The result type is int, return -1 to avoid a compiler warning (cast Py_ssize_t
to int). PyObject_Size() can only fail with -1, and anyway a constructor
should return -1 on error, not an arbitrary negative number.
13 years ago
Eric Snow
9d05c8c0e0
Issue #15022 : Ensure all pickle protocols are supported.
13 years ago
Eric Snow
b5c8f92782
Issue #15022 : Add pickle and comparison support to types.SimpleNamespace.
13 years ago
Eric Snow
547298c94c
Close #16160 : Subclass support now works for types.SimpleNamespace. Thanks to RDM for noticing.
13 years ago
Barry Warsaw
409da157d7
Eric Snow's implementation of PEP 421.
Issue 14673: Add sys.implementation
14 years ago