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
Boxiang Sun
cython
Commits
8657bc27
Commit
8657bc27
authored
Mar 17, 2016
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fall back to PyMem_Malloc() in PyPy (which doesn't have PyObject_Malloc() and friends)
parent
543786a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
Cython/Utility/CythonFunction.c
Cython/Utility/CythonFunction.c
+8
-0
No files found.
Cython/Utility/CythonFunction.c
View file @
8657bc27
...
...
@@ -498,7 +498,11 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
for
(
i
=
0
;
i
<
m
->
defaults_pyobjects
;
i
++
)
Py_XDECREF
(
pydefaults
[
i
]);
#if CYTHON_COMPILING_IN_CPYTHON
PyObject_Free
(
m
->
defaults
);
#else
PyMem_Free
(
m
->
defaults
);
#endif
m
->
defaults
=
NULL
;
}
...
...
@@ -708,7 +712,11 @@ static int __pyx_CyFunction_init(void) {
static
CYTHON_INLINE
void
*
__Pyx_CyFunction_InitDefaults
(
PyObject
*
func
,
size_t
size
,
int
pyobjects
)
{
__pyx_CyFunctionObject
*
m
=
(
__pyx_CyFunctionObject
*
)
func
;
#if CYTHON_COMPILING_IN_CPYTHON
m
->
defaults
=
PyObject_Malloc
(
size
);
#else
m
->
defaults
=
PyMem_Malloc
(
size
);
#endif
if
(
!
m
->
defaults
)
return
PyErr_NoMemory
();
memset
(
m
->
defaults
,
0
,
size
);
...
...
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