mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +00:00
Fix Pyston speedups (#281)
We remove (i.e. hide behind a debug ifdef) the recursion checking methods, and the memory hooks and memory allocator methods. ASAN mode has no PYMALLOC, so we need a macro. Fix build break with des.c stack allocation.
This commit is contained in:
parent
2fe8571010
commit
57f0eed382
42 changed files with 260 additions and 63 deletions
5
third_party/python/Include/objimpl.h
vendored
5
third_party/python/Include/objimpl.h
vendored
|
@ -17,8 +17,10 @@ void * PyObject_Realloc(void *, size_t);
|
|||
void PyObject_Free(void *);
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
#if IsModeDbg()
|
||||
/* This function returns the number of allocated memory blocks, regardless of size */
|
||||
Py_ssize_t _Py_GetAllocatedBlocks(void);
|
||||
#endif
|
||||
#endif /* !Py_LIMITED_API */
|
||||
|
||||
/* Macros */
|
||||
|
@ -117,6 +119,7 @@ PyVarObject * _PyObject_NewVar(PyTypeObject *, Py_ssize_t);
|
|||
constructor you would start directly with PyObject_Init/InitVar
|
||||
*/
|
||||
|
||||
#if IsModeDbg()
|
||||
#ifndef Py_LIMITED_API
|
||||
typedef struct {
|
||||
/* user context passed as the first argument to the 2 functions */
|
||||
|
@ -135,7 +138,7 @@ void PyObject_GetArenaAllocator(PyObjectArenaAllocator *allocator);
|
|||
/* Set the arena allocator. */
|
||||
void PyObject_SetArenaAllocator(PyObjectArenaAllocator *allocator);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Garbage Collection Support
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue