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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
61ed2e81
Commit
61ed2e81
authored
May 27, 2019
by
Stefan Behnel
Committed by
GitHub
May 27, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2971 from Dormouse759/0.29.x_pycode_new_compile_only
Fix compile error with 3.8
parents
93bf3a7d
761f996c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+5
-0
Cython/Utility/Profile.c
Cython/Utility/Profile.c
+8
-9
No files found.
Cython/Utility/ModuleSetupCode.c
View file @
61ed2e81
...
...
@@ -381,8 +381,13 @@ class __Pyx_FakeReference {
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#if PY_VERSION_HEX < 0x030800A4
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#define __Pyx_DefaultClassType PyType_Type
#endif
...
...
Cython/Utility/Profile.c
View file @
61ed2e81
...
...
@@ -293,20 +293,18 @@ static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const cha
PyObject
*
py_funcname
=
0
;
PyCodeObject
*
py_code
=
0
;
#if PY_MAJOR_VERSION < 3
#if PY_MAJOR_VERSION >= 3
py_code
=
PyCode_NewEmpty
(
srcfile
,
funcname
,
firstlineno
);
// make CPython use a fresh dict for "f_locals" at need (see GH #1836)
py_code
->
co_flags
|=
CO_OPTIMIZED
|
CO_NEWLOCALS
;
#else
py_funcname
=
PyString_FromString
(
funcname
);
py_srcfile
=
PyString_FromString
(
srcfile
);
#else
py_funcname
=
PyUnicode_FromString
(
funcname
);
py_srcfile
=
PyUnicode_FromString
(
srcfile
);
#endif
if
(
!
py_funcname
|
!
py_srcfile
)
goto
bad
;
py_code
=
PyCode_New
(
0
,
/*int argcount,*/
#if PY_MAJOR_VERSION >= 3
0
,
/*int kwonlyargcount,*/
#endif
0
,
/*int nlocals,*/
0
,
/*int stacksize,*/
// make CPython use a fresh dict for "f_locals" at need (see GH #1836)
...
...
@@ -326,6 +324,7 @@ static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const cha
bad:
Py_XDECREF
(
py_srcfile
);
Py_XDECREF
(
py_funcname
);
#endif
return
py_code
;
}
...
...
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