I want to embed the Python interpreter into a program written in Vala to allow for some runtime scripting. I can run parts of my vala code from Python using Introspection, and I've found a rudimentary example of embedding the interpreter in Python here: https://gist.github.com/astagi/1282808.
That example does not show how to pass an instance of an object in Vala to the interpreter and back. In the example of how to embed Python (http://docs.python.org/3/extending/embedding.html#pure-embedding) a variable of type long is converted to/form the python type using using something like this:
PyObject *pvalue = PyLong_FromLong(foo);
and
long foo=PyLong_asLong(pvalue);
The question is what are the equivalent functions for a variable in Vala of type GLib.Object [a GObject in C form].