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

Yann Vernier yann at donkey.dyndns.org
Sun Jan 30 00:11:19 CET 2005


On Sun, Jan 30, 2005 at 09:45:24AM +1100, sjmachin at lexicon.net wrote:
> I see no cdef here.
> 
> From my sample code:
> 
> def tester(s):

Well, I did:

cdef extern from "Python.h":
  int PyString_AsStringAndSize(...) # -> -1

Now, assuming that means that it returns -1 if it fails and has set an
exception, put "except -1" after the parenthesis and Pyrex should check
for it. 



More information about the Pyrex mailing list