[gt-users] Attach user data to GtGenomeNodes
Sascha Steinbiss
steinbiss at zbh.uni-hamburg.de
Tue Mar 3 10:00:48 CET 2009
Sascha Steinbiss wrote:
> Gordon Gremme wrote:
>> For the record: I talked to Sascha fact-to-face about this yesterday
>> and we agreed to use strings as keys.
>> It makes things a little bit more brittle on the C-side but it should
>> greatly simplify the usage in the bindings.
> I have a first version of the C implementation ready in my
> 'nodeuserdata' branch. Have a look at it, I added tests for the
> functionality too.
As for the bindings, after some consideration I am thinking about
implementing this differently in the bindings. Assume the bindings wrap
the C functions, which store a void pointer. Python
objects/dicts/whatever then could not be used in from the C side anyway.
Furthermore, when these items are later retrieved again from the
scripting language side via the wrapped C get_user_data() function, I am
afraid they cannot be 'cast' back to their original format, thus losing
their structure. Wouldn't it be a better idea if this functionality was
implemented rather directly on the scripting language side than wrapping
the C functions?
Sascha
--
Sascha Steinbiss
Center for Bioinformatics
University of Hamburg
Bundesstr. 43
20146 Hamburg
Germany
Email: steinbiss at zbh.uni-hamburg.de
URL: http://www.zbh.uni-hamburg.de/steinbiss
Phone: +49 (40) 42838 7322
FAX: +49 (40) 42838 7312
More information about the gt-users
mailing list