[Pyrex] How to deal with Obtaining char * from temporary Python value ?
Mateusz Korniak
mateusz at ant.gliwice.pl
Sun Jun 20 22:37:01 CEST 2004
I have python class Item which has many string atributes like name,
description etc...
I would like to pass it to my C written core so I have written pyrex
interface file:
iface.pyx :
def add_item(item):
c_add_item(item.id,item.name,item.groups,item.name_ascii,
item.groups_ascii,item.description
,item.url,item.graph_url,item.price_brutto,item.price_netto)
But I get error: Obtaining char * from temporary Python value
I am aware that I can't rely on that char * , but first thing I do in
c_add_item is copy contents of all ptrs, and take care of allocaton issues.
How should I solve such problem ?
TIA, regards
--
Mateusz Korniak
"Black holes are where God divided by zero." - Steven Wright
More information about the Pyrex
mailing list