diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2013-07-07 23:30:24 +0200 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2013-07-07 23:30:24 +0200 |
| commit | 49fc8ece8172162510890f42127d2aa4e13f878b (patch) | |
| tree | 798c7555b232e40e607ec1b01cec87687515cf57 /Include | |
| parent | 6f8eeee7b9cae7e3f899c89baefe9acc575f2fb5 (diff) | |
| download | cpython-git-49fc8ece8172162510890f42127d2aa4e13f878b.tar.gz | |
Issue #18203: Add _PyMem_RawStrdup() and _PyMem_Strdup()
Replace strdup() with _PyMem_RawStrdup() or _PyMem_Strdup(), depending if the
GIL is held or not.
Diffstat (limited to 'Include')
| -rw-r--r-- | Include/pymem.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/pymem.h b/Include/pymem.h index 58c52425b4..83f1537f3f 100644 --- a/Include/pymem.h +++ b/Include/pymem.h @@ -58,6 +58,9 @@ PyAPI_FUNC(void *) PyMem_Malloc(size_t size); PyAPI_FUNC(void *) PyMem_Realloc(void *ptr, size_t new_size); PyAPI_FUNC(void) PyMem_Free(void *ptr); +PyAPI_FUNC(char *) _PyMem_RawStrdup(const char *str); +PyAPI_FUNC(char *) _PyMem_Strdup(const char *str); + /* Macros. */ /* PyMem_MALLOC(0) means malloc(1). Some systems would return NULL |
