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
58382606
Commit
58382606
authored
May 02, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import from pyx working
parent
c7476b5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+5
-1
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+2
-2
No files found.
Cython/Compiler/Main.py
View file @
58382606
...
...
@@ -249,11 +249,13 @@ class Context(object):
FlattenInListTransform
,
WithTransform
,
]:
pass
#
continue
continue
pipeline
.
append
(
stage
)
if
isinstance
(
stage
,
AnalyseDeclarationsTransform
):
break
def
fake_pxd
(
root
):
for
entry
in
root
.
scope
.
entries
.
values
():
entry
.
defined_in_pxd
=
1
return
StatListNode
(
root
.
pos
,
stats
=
[]),
root
.
scope
pipeline
.
append
(
fake_pxd
)
return
pipeline
...
...
@@ -605,7 +607,9 @@ def create_parse(context):
source_desc
=
compsrc
.
source_desc
full_module_name
=
compsrc
.
full_module_name
initial_pos
=
(
source_desc
,
1
,
0
)
saved_cimport_from_pyx
,
Options
.
cimport_from_pyx
=
Options
.
cimport_from_pyx
,
False
scope
=
context
.
find_module
(
full_module_name
,
pos
=
initial_pos
,
need_pxd
=
0
)
Options
.
cimport_from_pyx
=
saved_cimport_from_pyx
tree
=
context
.
parse
(
source_desc
,
scope
,
pxd
=
0
,
full_module_name
=
full_module_name
)
tree
.
compilation_source
=
compsrc
tree
.
scope
=
scope
...
...
Cython/Compiler/ModuleNode.py
View file @
58382606
...
...
@@ -2115,7 +2115,7 @@ 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
:
if
entry
.
api
or
entry
.
defined_in_pxd
or
Options
.
cimport_from_pyx
:
entries
.
append
(
entry
)
if
entries
:
env
.
use_utility_code
(
voidptr_export_utility_code
)
...
...
@@ -2129,7 +2129,7 @@ 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
:
if
entry
.
api
or
entry
.
defined_in_pxd
or
Options
.
cimport_from_pyx
:
entries
.
append
(
entry
)
if
entries
:
env
.
use_utility_code
(
function_export_utility_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