[Pyrex] Function wrapping problems

Bob Ippolito bob at redivi.com
Wed Oct 15 04:08:00 CEST 2003


On Tuesday, Oct 14, 2003, at 22:02 America/New_York, Greg Ewing wrote:

> Bob Ippolito <bob at redivi.com>:
>
>>      for arg in args:
>>        argv[i] = PyString_FromString(arg)
>
> I think you mean PyString_AsString here. But you don't need
> to do that, all you need is

Yeah that's what I meant.

>          argv[i] = arg
>
> since Pyrex will automatically turn the Python string into
> a char *.

Nice, didn't know that.  I typically use the buffer API, so I didn't 
bother learning the automatic str -> char* conversion.

-bob





More information about the Pyrex mailing list