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
5a31a3d8
Commit
5a31a3d8
authored
Feb 24, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix public C-APIs: was missing macro definition of __Pyx_PyIdentifier_FromString()
parent
e2512eae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+5
-2
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+11
-2
No files found.
Cython/Compiler/ModuleNode.py
View file @
5a31a3d8
...
...
@@ -236,6 +236,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
cname
=
env
.
mangle
(
Naming
.
varptr_prefix
,
entry
.
name
)
h_code
.
putln
(
"static %s = 0;"
%
type
.
declaration_code
(
cname
))
h_code
.
putln
(
"#define %s (*%s)"
%
(
entry
.
name
,
cname
))
h_code
.
put
(
UtilityCode
.
load_cached
(
"PyIdentifierFromString"
,
"ModuleSetupCode.c"
).
proto
)
h_code
.
put
(
import_module_utility_code
.
impl
)
if
api_vars
:
h_code
.
put
(
voidptr_import_utility_code
.
impl
)
...
...
@@ -2374,7 +2375,8 @@ bad:
return 0;
}
#endif
"""
)
"""
,
requires
=
[
UtilityCode
.
load_cached
(
"PyIdentifierFromString"
,
"ModuleSetupCode.c"
)])
#------------------------------------------------------------------------------------
...
...
@@ -2435,7 +2437,8 @@ bad:
return NULL;
}
#endif
"""
)
"""
,
requires
=
[
UtilityCode
.
load_cached
(
"PyIdentifierFromString"
,
"ModuleSetupCode.c"
)])
#------------------------------------------------------------------------------------
...
...
Cython/Utility/ModuleSetupCode.c
View file @
5a31a3d8
...
...
@@ -83,12 +83,10 @@
#if PY_MAJOR_VERSION < 3
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#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)
#endif
...
...
@@ -369,3 +367,14 @@ static int __Pyx_check_binary_version(void) {
}
return
0
;
}
/////////////// PyIdentifierFromString.proto ///////////////
#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
#define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif
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