Commit de82cd05 authored by Stefan Behnel's avatar Stefan Behnel

minor doc fixes

parent ebfddaba
...@@ -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 cdef char* 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 recursively 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment