Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
62f66698
Commit
62f66698
authored
Aug 09, 2018
by
John Kirkham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define Raw memory functions near non-Raw ones
parent
8d324dfd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
Cython/Includes/cpython/mem.pxd
Cython/Includes/cpython/mem.pxd
+3
-5
No files found.
Cython/Includes/cpython/mem.pxd
View file @
62f66698
from
cpython.version
cimport
PY_VERSION_HEX
cdef
extern
from
*
:
void
*
PyMem_RawMalloc
(
size_t
n
)
nogil
void
*
PyMem_RawRealloc
(
void
*
p
,
size_t
n
)
nogil
void
PyMem_RawFree
(
void
*
p
)
nogil
cdef
extern
from
"Python.h"
:
#####################################################################
...
...
@@ -34,6 +29,7 @@ cdef extern from "Python.h":
# available for allocating and releasing memory from the Python
# heap:
void
*
PyMem_RawMalloc
(
size_t
n
)
nogil
void
*
PyMem_Malloc
(
size_t
n
)
# Allocates n bytes and returns a pointer of type void* to the
# allocated memory, or NULL if the request fails. Requesting zero
...
...
@@ -41,6 +37,7 @@ cdef extern from "Python.h":
# PyMem_Malloc(1) had been called instead. The memory will not
# have been initialized in any way.
void
*
PyMem_RawRealloc
(
void
*
p
,
size_t
n
)
nogil
void
*
PyMem_Realloc
(
void
*
p
,
size_t
n
)
# Resizes the memory block pointed to by p to n bytes. The
# contents will be unchanged to the minimum of the old and the new
...
...
@@ -50,6 +47,7 @@ cdef extern from "Python.h":
# NULL, it must have been returned by a previous call to
# PyMem_Malloc() or PyMem_Realloc().
void
PyMem_RawFree
(
void
*
p
)
nogil
void
PyMem_Free
(
void
*
p
)
# Frees the memory block pointed to by p, which must have been
# returned by a previous call to PyMem_Malloc() or
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment