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
Boxiang Sun
cython
Commits
a7c689c1
Commit
a7c689c1
authored
Aug 11, 2012
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another cpp-class-as-cdef-class-member fix, fix test with side effect.
parent
b757adc9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+3
-2
runtests.py
runtests.py
+1
-1
tests/run/cpp_vector_in_generator.pyx
tests/run/cpp_vector_in_generator.pyx
+6
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
a7c689c1
...
@@ -1099,8 +1099,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1099,8 +1099,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"if (p->__weakref__) PyObject_ClearWeakRefs(o);"
)
code
.
putln
(
"if (p->__weakref__) PyObject_ClearWeakRefs(o);"
)
for
entry
in
cpp_class_attrs
:
for
entry
in
cpp_class_attrs
:
class_name
=
entry
.
type
.
cname
.
split
(
"::"
)[
-
1
]
destructor_name
=
entry
.
type
.
cname
.
split
(
"::"
)[
-
1
]
code
.
putln
(
"p->%s.~%s();"
%
(
entry
.
cname
,
class_name
))
code
.
putln
(
"p->%s.%s::~%s();"
%
(
entry
.
cname
,
entry
.
type
.
declaration_code
(
""
),
destructor_name
))
for
entry
in
py_attrs
:
for
entry
in
py_attrs
:
code
.
put_xdecref_clear
(
"p->%s"
%
entry
.
cname
,
entry
.
type
,
nanny
=
False
,
code
.
put_xdecref_clear
(
"p->%s"
%
entry
.
cname
,
entry
.
type
,
nanny
=
False
,
...
...
runtests.py
View file @
a7c689c1
...
@@ -1346,7 +1346,7 @@ def flush_and_terminate(status):
...
@@ -1346,7 +1346,7 @@ def flush_and_terminate(status):
def main():
def main():
global DISTDIR
global DISTDIR
, WITH_CYTHON
DISTDIR = os.path.join(os.getcwd(), os.path.dirname(sys.argv[0]))
DISTDIR = os.path.join(os.getcwd(), os.path.dirname(sys.argv[0]))
from optparse import OptionParser
from optparse import OptionParser
...
...
tests/run/cpp_vector_in_generator.pyx
View file @
a7c689c1
...
@@ -10,3 +10,9 @@ def stack_vector_in_generator(vector[int] vint):
...
@@ -10,3 +10,9 @@ def stack_vector_in_generator(vector[int] vint):
"""
"""
for
i
in
vint
:
for
i
in
vint
:
yield
i
yield
i
def
vector_arg_in_function
(
py_v
):
"""
>>> print "Unneeded function with side effect."
"""
cdef
vector
[
int
]
v
=
py_v
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