[Pyrex] Initialisation of cdef global arrays with constants [resend]

Jani Hakala jahakala at cc.jyu.fi
Fri Jan 28 23:57:01 CET 2005


sjmachin at lexicon.net writes:


>
> Where I'm coming from is (my belief/understanding) that a "Python
> function" hand coded in C _should_ return NULL in this circumstance,
> so that the precise exception set by the called function can be
> thrown, instead of a guess.
>
Python library has a global variable called Py_None that is returned
instead of a null pointer. Even the reference count has to be
incremented properly for Py_None before returning it as a return
value. 

Jani Hakala



More information about the Pyrex mailing list