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
de82cd05
Commit
de82cd05
authored
Aug 13, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor doc fixes
parent
ebfddaba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
docs/src/userguide/language_basics.rst
docs/src/userguide/language_basics.rst
+5
-4
No files found.
docs/src/userguide/language_basics.rst
View file @
de82cd05
...
@@ -117,15 +117,16 @@ using normal C declaration syntax. For example,::
...
@@ -117,15 +117,16 @@ using normal C declaration syntax. For example,::
When a parameter of a Python function is declared to have a C data type, it is
When a parameter of a Python function is declared to have a C data type, it is
passed in as a Python object and automatically converted to a C value, if
passed in as a Python object and automatically converted to a C value, if
possible. In other words, the definition of `spam` above is equivalent to writing::
possible. In other words, the definition of ``spam`` above is equivalent to
writing::
def spam(python_i, python_s):
def spam(python_i, python_s):
int i = python_i
cdef
int i = python_i
char* s = python_s
c
def c
har* s = python_s
...
...
Automatic conversion is currently only possible for numeric types,
Automatic conversion is currently only possible for numeric types,
string types and structs (composed recusively of any of these types);
string types and structs (composed recu
r
sively of any of these types);
attempting to use any other type for the parameter of a
attempting to use any other type for the parameter of a
Python function will result in a compile-time error.
Python function will result in a compile-time error.
Care must be taken with strings to ensure a reference if the pointer is to be used
Care must be taken with strings to ensure a reference if the pointer is to be used
...
...
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