[Pyrex] Total newbie needs code review

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Sep 12 07:28:02 CEST 2005


Chris Stromberger wrote:

> I guess this is why pyrex says "Obtaining char * from temporary Python
> value" when I compile the pyx?

Pyrex tries to save you from yourself if you do anything
with a string that looks blatantly dangerous, but it
can't tell for sure, and sometimes it errs on the side
of paranoia.

If it's giving a false alarm, you should be able to
shut it up by assigning the offending Python string
to an intermediate variable before doing the char *
conversion.

What code is giving this message, exactly?

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+



More information about the Pyrex mailing list