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
c7919539
Commit
c7919539
authored
Nov 08, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #72 from cournape/master
Adding a few words about wrapping static members
parents
feefccc1
a827e7ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
docs/src/userguide/wrapping_CPlusPlus.rst
docs/src/userguide/wrapping_CPlusPlus.rst
+21
-0
No files found.
docs/src/userguide/wrapping_CPlusPlus.rst
View file @
c7919539
...
@@ -406,6 +406,27 @@ called, which allows one to do custom C++ to Python error "translations." If
...
@@ -406,6 +406,27 @@ called, which allows one to do custom C++ to Python error "translations." If
raise_py_error does not actually raise an exception a RuntimeError will be
raise_py_error does not actually raise an exception a RuntimeError will be
raised.
raised.
Static member method
--------------------
If the Rectangle class has a static member:
.. sourcecode:: c++
namespace shapes {
class Rectangle {
...
public:
static void do_something();
};
}
you can declare it as a function living in the class namespace, i.e.::
cdef extern from "Rectangle.h" namespace "shapes::Rectangle":
void do_something()
Caveats and Limitations
Caveats and Limitations
========================
========================
...
...
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