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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
075530a1
Commit
075530a1
authored
May 30, 2016
by
David Nogueira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More fixes.
parent
3f861413
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
docs/src/userguide/wrapping_CPlusPlus.rst
docs/src/userguide/wrapping_CPlusPlus.rst
+3
-3
No files found.
docs/src/userguide/wrapping_CPlusPlus.rst
View file @
075530a1
...
...
@@ -52,7 +52,7 @@ document. Let's assume it will be in a header file called
Rectangle(int x0, int y0, int x1, int y1);
~Rectangle();
int getArea();
void getSize(int* width, int* height)
void getSize(int* width, int* height)
;
void move(int dx, int dy);
};
}
...
...
@@ -247,8 +247,8 @@ forwarding methods. So we can implement the Python extension type as::
self.c_rect = Rectangle(x0, y0, x1, y1)
def get_area(self):
return self.c_rect.getArea()
def get_size(self)
int width, int
height
def get_size(self)
:
cdef int width,
height
self.c_rect.getSize(&width, &height)
return width, height
def move(self, dx, dy):
...
...
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