On Mon, 2015-07-06 at 23:45 +0000, Justin Tai wrote:
Not sure how to continue the email chain on this mailing list, so
copying it below.
Thanks David for your response :-). I'm having trouble converting a
python callable object to a C function to pass into
c_register_pragma() to register the new callback. Should this be
implemented like how attribute support was added? That is, have a
single callback in the python plugin for whenever a pragma is parsed,
and from there do a lookup on an internal table of all registered
pragma? This seems like a poor use of c_register_pragma().
I think
c_register_pragma_with_data
lets you associate an arbitrary void * with the new pragma, so you could
use that, casting the void * to a PyObject * and have that be the Python
callable. You'd then have a single C callback to handle calling that
callable (if that makes sense)
[snip]