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
6cc9a65e
Commit
6cc9a65e
authored
Feb 21, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix wrapper tests, now that the compiler is fixed
parent
c972630d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
4 deletions
+33
-4
tests/bugs.txt
tests/bugs.txt
+0
-1
tests/wrappers/cpp_overload_wrapper.pyx
tests/wrappers/cpp_overload_wrapper.pyx
+31
-1
tests/wrappers/cpp_overload_wrapper_lib.cpp
tests/wrappers/cpp_overload_wrapper_lib.cpp
+1
-1
tests/wrappers/cpp_overload_wrapper_lib.pxd
tests/wrappers/cpp_overload_wrapper_lib.pxd
+1
-1
No files found.
tests/bugs.txt
View file @
6cc9a65e
...
...
@@ -9,4 +9,3 @@ missing_baseclass_in_predecl_T262
cfunc_call_tuple_args_T408
cascaded_list_unpacking_T467
compile.cpp_operators
cpp_overload_wrapper
tests/wrappers/cpp_overload_wrapper.pyx
View file @
6cc9a65e
cimport
cppwrap_lib
cimport
cpp
_overload_wrapper_lib
as
cpp
wrap_lib
cdef
class
DoubleKeeper
:
"""
>>> d = DoubleKeeper()
>>> d.get_number()
1.0
>>> d.set_number(5.5)
>>> d.get_number()
5.5
>>> d.set_number(0)
>>> d.get_number()
0.0
"""
cdef
cppwrap_lib
.
DoubleKeeper
*
keeper
def
__cinit__
(
self
,
number
=
None
):
...
...
@@ -23,14 +34,33 @@ cdef class DoubleKeeper:
return
self
.
keeper
.
get_number
()
def
transmogrify
(
self
,
double
value
):
"""
>>> d = DoubleKeeper(5.5)
>>> d.transmogrify(1.0)
5.5
>>> d.transmogrify(2.0)
11.0
"""
return
self
.
keeper
.
transmogrify
(
value
)
def
voidfunc
():
"""
>>> voidfunc()
"""
cppwrap_lib
.
voidfunc
()
def
doublefunc
(
double
x
,
double
y
,
double
z
):
"""
>>> doublefunc(1.0, 2.0, 3.0) == 1.0 + 2.0 + 3.0
True
"""
return
cppwrap_lib
.
doublefunc
(
x
,
y
,
z
)
def
transmogrify_from_cpp
(
DoubleKeeper
obj
not
None
,
double
value
):
"""
>>> d = DoubleKeeper(2.0)
>>> d.transmogrify(3.0) == 6.0
True
"""
return
cppwrap_lib
.
transmogrify_from_cpp
(
obj
.
keeper
,
value
)
tests/wrappers/cpp_overload_wrapper_lib.cpp
View file @
6cc9a65e
#include "cpp
wrap
_lib.h"
#include "cpp
_overload_wrapper
_lib.h"
void
voidfunc
(
void
)
{
...
...
tests/wrappers/cpp_overload_wrapper_lib.pxd
View file @
6cc9a65e
cdef
extern
from
"
testapi
.h"
:
cdef
extern
from
"
cpp_overload_wrapper_lib
.h"
:
void
voidfunc
()
double
doublefunc
(
double
a
,
double
b
,
double
c
)
...
...
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