Dude, I finally got it working!!! And i'm pissed at what my biggest problems
have been. It turns out that if i have a function in an xsub that does a
malloc, then it segfaults, haowever, if the xsub function calls a c function
that does a malloc, (same with the appropriate free) then it works fine!
Everything works great now. but I can't figure out what the difference would
be.
-reza
On Fri, Apr 07, 2000 at 03:36:14PM -0500, Tye McQueen sent me this...
> Excerpts from the mail message of Reza Naima:
> ) opts->mapfile = 80DC538
> [...]
> ) appending outfile
> [...]
> ) Now mapfile = /tmp/outfile.gif and opts->outfile = 666967
>
> Oops. The buffer is realloced and so pointers into the old
> buffer become invalid.
>
> When I started writing that code, I calculated the total buffer
> space required before the very first sv_grow but it started looking
> ugly so I went for "simple" and didn't think about it enough.
>
> I suggest you switch to the strdup/free method I mentioned before.
> --
> Tye McQueen Nothing is obvious unless you are overlooking something
> http://www.metronet.com/~tye/ (scripts, links, nothing fancy)