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
e56d5ec6
Commit
e56d5ec6
authored
Apr 10, 2013
by
nbruin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explain difference between cdef and cpdef
parent
970afb34
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
docs/src/tutorial/clibraries.rst
docs/src/tutorial/clibraries.rst
+4
-1
No files found.
docs/src/tutorial/clibraries.rst
View file @
e56d5ec6
...
@@ -426,7 +426,10 @@ methods from ``cdef`` to ``cpdef``. This will let Cython generate two
...
@@ -426,7 +426,10 @@ methods from ``cdef`` to ``cpdef``. This will let Cython generate two
entry points, one that is callable from normal Python code using the
entry points, one that is callable from normal Python code using the
Python call semantics and Python objects as arguments, and one that is
Python call semantics and Python objects as arguments, and one that is
callable from C code with fast C semantics and without requiring
callable from C code with fast C semantics and without requiring
intermediate argument conversion from or to Python types.
intermediate argument conversion from or to Python types. Note that ``cpdef``
methods ensure that they can be appropriately overridden by Python
methods even when they are called from Cython. This adds a tiny overhead
compared to ``cdef`` methods.
The following listing shows the complete implementation that uses
The following listing shows the complete implementation that uses
``cpdef`` methods where possible::
``cpdef`` methods where possible::
...
...
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