Hi list,
I am working with libyaml, a C library to parse yaml docs. Some libyaml
functions give string results by malloc'ing memory and giving back pointers
to those strings in a struct. They then require the caller to call a
libyaml "destroy" function on the struct that frees the strings.

I would like to make a deep copy of the manually managed struct to a
garbage collected struct so that I can keep some data after I called the
libyaml destroy function and not worry about freeing it. Does anyone know
how to do this simply ?

For now, I'm using the following workaround:
https://github.com/jonenst/factor/commit/545287e377ecc4722155e42deaf8dcfa779f8358

cheers,
Jon
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to