From de82cd0563ce4d338940bfd219572b00cc028221 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 13 Aug 2013 10:27:01 +0200 Subject: [PATCH] minor doc fixes --- docs/src/userguide/language_basics.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/src/userguide/language_basics.rst b/docs/src/userguide/language_basics.rst index 7c41c39..41e289f 100644 --- a/docs/src/userguide/language_basics.rst +++ b/docs/src/userguide/language_basics.rst @@ -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 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): - int i = python_i - char* s = python_s + cdef int i = python_i + cdef char* s = python_s ... 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 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 -- 2.7.4