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
fca87390
Commit
fca87390
authored
Jul 02, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish cimport from pyx.
parent
58382606
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+6
-2
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+2
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
fca87390
...
...
@@ -2115,7 +2115,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
# Generate code to create PyCFunction wrappers for exported C functions.
entries
=
[]
for
entry
in
env
.
var_entries
:
if
entry
.
api
or
entry
.
defined_in_pxd
or
Options
.
cimport_from_pyx
:
if
(
entry
.
api
or
entry
.
defined_in_pxd
or
(
Options
.
cimport_from_pyx
and
not
entry
.
visibility
==
'extern'
)):
entries
.
append
(
entry
)
if
entries
:
env
.
use_utility_code
(
voidptr_export_utility_code
)
...
...
@@ -2129,7 +2131,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
# Generate code to create PyCFunction wrappers for exported C functions.
entries
=
[]
for
entry
in
env
.
cfunc_entries
:
if
entry
.
api
or
entry
.
defined_in_pxd
or
Options
.
cimport_from_pyx
:
if
(
entry
.
api
or
entry
.
defined_in_pxd
or
(
Options
.
cimport_from_pyx
and
not
entry
.
visibility
==
'extern'
)):
entries
.
append
(
entry
)
if
entries
:
env
.
use_utility_code
(
function_export_utility_code
)
...
...
Cython/Compiler/Symtab.py
View file @
fca87390
...
...
@@ -1078,6 +1078,8 @@ class ModuleScope(Scope):
self.var_entries.append(entry)
else:
entry.is_pyglobal = 1
if Options.cimport_from_pyx:
entry.used = 1
return entry
def declare_cfunction(self, name, type, pos,
...
...
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