On May 14, 2009, at 10:22 PM, Mohamed Lrhazi wrote: > On Fri, May 15, 2009 at 12:45 AM, Robert Bradshaw > <[email protected]> wrote: >>> hdr_n is a string that came from Python... maybe full code with help >>> you better see my mistakes :) http://pastebin.com/dbd60984 >>> >>> that function is called by code in Python land, passing lists or >>> header names to delete, or dicts of header name/value to add/ >>> replace. >> >> See http://docs.cython.org/docs/language_basics.html#caveats-when- >> using-a-python-string-in-a-c-context >> >> (Perhaps "Caveats" is too weak of a warning to use here...) >> > > Thanks Robert... did not pay attention to that little paragraph... > Now, I tried this a solution: http://pastebin.com/d4ab1c687 > > putting my Python strings in a list of tuples, and refering to them in > the <char *> assignment. > > My program still get sigfault... isnt not a solution to the said > Caveat?
How long do you keep the tuple around? - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
