-
Notifications
You must be signed in to change notification settings - Fork 83
Description
Making a new issue for this at the request of @jeromekelleher since #3306 was merged and closed. Tagging @petrelharp since he'll be a client of this API too, in pyslim.
Copy-paste from #3306:
The stuff in test_core.c that puts together an example for testing would be useful to have in tskit. Most importantly, the
JBLBmagic bytes should either (a) be exposed in core.h, or (b) should be set up by a tskit function, probably? It's a bit weird for SLiM to duplicate this magic in its own code. Less importantly, it'd be nice to provideset_u64_le()as a utility function. Providing a "write" equivalent oftsk_json_struct_metadata_get_blob()seems tricky since it wouldn't want to do its own malloc for the result, so then the caller needs to know how many bytes of storage will be needed, so life gets complicated and messy. Anyhow, I'll just duplicate the magic andset_u64_le()in SLiM for now, but maybe this is worth thinking about a bit so that every tskit client using this stuff doesn't end up copying those same things into their own codebases?