Commit Graph

20 Commits

Author SHA1 Message Date
Jeroen Demeyer
351c67416b bpo-35983: skip trashcan for subclasses (GH-11841)
Add new trashcan macros to deal with a double deallocation that could occur when the `tp_dealloc` of a subclass calls the `tp_dealloc` of a base class and that base class uses the trashcan mechanism.

Patch by Jeroen Demeyer.
2019-05-10 19:21:10 +02:00
Serhiy Storchaka
d53fe5f407
bpo-36254: Fix invalid uses of %d in format strings in C. (GH-12264) 2019-03-13 22:59:55 +02:00
Victor Stinner
a42de742e7
bpo-35059: Cast void* to PyObject* (GH-10650)
Don't pass void* to Python macros: use _PyObject_CAST().
2018-11-22 10:25:22 +01:00
Victor Stinner
bcda8f1d42
bpo-35081: Add Include/internal/pycore_object.h (GH-10640)
Move _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() from
Include/objimpl.h to Include/internal/pycore_object.h.
2018-11-21 22:27:47 +01:00
Victor Stinner
621cebe81b
bpo-35081: Rename internal headers (GH-10275)
Rename Include/internal/ headers:

* pycore_hash.h -> pycore_pyhash.h
* pycore_lifecycle.h -> pycore_pylifecycle.h
* pycore_mem.h -> pycore_pymem.h
* pycore_state.h -> pycore_pystate.h

Add missing headers to Makefile.pre.in and PCbuild:

* pycore_condvar.h.
* pycore_hamt.h
* pycore_pyhash.h
2018-11-12 16:53:38 +01:00
Victor Stinner
27e2d1f219
bpo-35081: Add pycore_ prefix to internal header files (GH-10263)
* Rename Include/internal/ header files:

  * pyatomic.h -> pycore_atomic.h
  * ceval.h -> pycore_ceval.h
  * condvar.h -> pycore_condvar.h
  * context.h -> pycore_context.h
  * pygetopt.h -> pycore_getopt.h
  * gil.h -> pycore_gil.h
  * hamt.h -> pycore_hamt.h
  * hash.h -> pycore_hash.h
  * mem.h -> pycore_mem.h
  * pystate.h -> pycore_state.h
  * warnings.h -> pycore_warnings.h

* PCbuild project, Makefile.pre.in, Modules/Setup: add the
  Include/internal/ directory to the search paths of header files.
* Update includes. For example, replace #include "internal/mem.h"
  with #include "pycore_mem.h".
2018-11-01 00:52:28 +01:00
Zackery Spytz
d8c3e820b4 Fix GCC warning in Python/hamt.c (GH-7618) 2018-07-06 17:50:38 +09:00
Yury Selivanov
378c53cc31
bpo-33803: Fix a crash in hamt.c (#7504) 2018-06-07 20:29:55 -04:00
Ville Skyttä
61f82e0e33 Spelling fixes to docs, docstrings, and comments (GH-6374) 2018-04-20 16:08:45 -04:00
Xiang Zhang
3c7ac7ea20
Add two missing error checks in hamt.c (GH-5851) 2018-03-08 13:59:46 +08:00
Serhiy Storchaka
bfe4fd5f2e
Fix some warnings produced by different compilers. (#5593) 2018-02-09 17:31:26 +02:00
Yury Selivanov
55e0839f26
bpo-32436: Fix compiler warning (#5483) 2018-02-01 22:24:56 -05:00
Dmitry Alimov
01a0cb8916 Fix typo in hamt.c comments (#5478) 2018-02-01 21:59:48 -05:00
Yury Selivanov
b647d7039d
bpo-32707: Fix warnings in hamt.c (#5430) 2018-01-29 13:31:37 -05:00
Yury Selivanov
6ab62920c8
bpo-32436: Fix a refleak; var GC tracking; a GCC warning (#5326)
The refleak in question wasn't really important, as context vars
are usually created at the toplevel and live as long as the interpreter
lives, so the context var name isn't ever GCed anyways.
2018-01-25 14:18:55 -05:00
Dmitry Alimov
93a6119f08 Fix 3rd level node's binary representation in HAMT algorithm description (#5319) 2018-01-25 12:54:41 -05:00
Yury Selivanov
b7a80d543e
bpo-32436: Don't use native popcount() (also fixes bpo-32641) (#5292) 2018-01-23 22:17:04 -05:00
Yury Selivanov
0bad4d63c6
bpo-32436: Fix potential NULL dereference (#5286) 2018-01-23 16:26:07 -05:00
Yury Selivanov
83c8675edb
bpo-32436: Remove a redundant assert (#5275) 2018-01-23 02:00:03 -05:00
Yury Selivanov
f23746a934
bpo-32436: Implement PEP 567 (#5027) 2018-01-22 19:11:18 -05:00