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
e50889a2
Commit
e50889a2
authored
Jul 28, 2015
by
scoder
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #425 from insertinterestingnamehere/call_fix
More tests for calling stack allocated objects
parents
09874820
e5347fad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
tests/run/cpp_call_stack_allocated.srctree
tests/run/cpp_call_stack_allocated.srctree
+8
-0
No files found.
tests/run/cpp_call_stack_allocated.srctree
View file @
e50889a2
...
...
@@ -19,6 +19,8 @@ public:
wint() { val = 0; }
wint(long long val) { this->val = val; }
long long &operator()() { return this->val; }
long long operator()(long long i) { return this->val + i; }
long long operator()(long long i, long long j) { return this->val + i + j; }
};
######## call.pxd ########
...
...
@@ -29,6 +31,8 @@ cdef extern from "call.cpp" nogil:
wint()
wint(long long val)
long long& operator()()
long long operator()(long long i)
long long operator()(long long i, long long j)
######## call_stack_allocated.pyx ########
...
...
@@ -39,4 +43,8 @@ def test():
cdef long long b = 3
b = a()
assert b == 4
b = a(1ll)
assert b == 5
b = a(1ll, 1ll)
assert b == 6
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