Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2cc3b9a

Browse files
committed
Check Py_LIMITED_API version
1 parentfa30035 commit2cc3b9a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎Include/pymem.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ PyAPI_FUNC(void) PyMem_Free(void *ptr);
9191
#definePyMem_DEL(p) PyMem_Free((p))
9292

9393

94+
#if !defined(Py_LIMITED_API)||Py_LIMITED_API+0 >=0x030d0000
9495
// Memory allocator which doesn't require the GIL to be held.
9596
// Usually, it's just a thin wrapper to functions of the standard C library:
9697
// malloc(), calloc(), realloc() and free(). The difference is that
@@ -99,6 +100,7 @@ PyAPI_FUNC(void *) PyMem_RawMalloc(size_t size);
99100
PyAPI_FUNC(void*)PyMem_RawCalloc(size_tnelem,size_telsize);
100101
PyAPI_FUNC(void*)PyMem_RawRealloc(void*ptr,size_tnew_size);
101102
PyAPI_FUNC(void)PyMem_RawFree(void*ptr);
103+
#endif
102104

103105
#ifndefPy_LIMITED_API
104106
# definePy_CPYTHON_PYMEM_H

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp