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
Gwenaël Samain
cython
Commits
8790b603
Commit
8790b603
authored
Apr 06, 2013
by
scoder
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #208 from nnemkin/cimport_from_pyx_fix
Fix extern variable cimport code in cimport_from_pyx mode
parents
831a2354
16005a3d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
Cython/Compiler/Pipeline.py
Cython/Compiler/Pipeline.py
+2
-1
tests/run/cimport_from_pyx.srctree
tests/run/cimport_from_pyx.srctree
+4
-1
No files found.
Cython/Compiler/Pipeline.py
View file @
8790b603
...
@@ -275,6 +275,7 @@ def create_pyx_as_pxd_pipeline(context, result):
...
@@ -275,6 +275,7 @@ def create_pyx_as_pxd_pipeline(context, result):
break
break
def
fake_pxd
(
root
):
def
fake_pxd
(
root
):
for
entry
in
root
.
scope
.
entries
.
values
():
for
entry
in
root
.
scope
.
entries
.
values
():
if
not
entry
.
in_cinclude
:
entry
.
defined_in_pxd
=
1
entry
.
defined_in_pxd
=
1
return
StatListNode
(
root
.
pos
,
stats
=
[]),
root
.
scope
return
StatListNode
(
root
.
pos
,
stats
=
[]),
root
.
scope
pipeline
.
append
(
fake_pxd
)
pipeline
.
append
(
fake_pxd
)
...
...
tests/run/cimport_from_pyx.srctree
View file @
8790b603
...
@@ -15,12 +15,13 @@ setup(
...
@@ -15,12 +15,13 @@ setup(
######## a.pyx ########
######## a.pyx ########
from b cimport Bclass, Bfunc, Bstruct, Benum, Benum_value, Btypedef
from b cimport Bclass, Bfunc, Bstruct, Benum, Benum_value, Btypedef
, Py_EQ, Py_NE
cdef Bclass b = Bclass(5)
cdef Bclass b = Bclass(5)
assert Bfunc(&b.value) == b.value
assert Bfunc(&b.value) == b.value
assert b.asStruct().value == b.value
assert b.asStruct().value == b.value
cdef Btypedef b_type = &b.value
cdef Btypedef b_type = &b.value
cdef Benum b_enum = Benum_value
cdef Benum b_enum = Benum_value
cdef int tmp = Py_EQ
#from c cimport ClassC
#from c cimport ClassC
#cdef ClassC c = ClassC()
#cdef ClassC c = ClassC()
...
@@ -28,6 +29,8 @@ cdef Benum b_enum = Benum_value
...
@@ -28,6 +29,8 @@ cdef Benum b_enum = Benum_value
######## b.pyx ########
######## b.pyx ########
from cpython.object cimport Py_EQ, Py_NE
cdef enum Benum:
cdef enum Benum:
Benum_value
Benum_value
...
...
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