-
Notifications
You must be signed in to change notification settings - Fork 17
Glossary
This may or may not be useful to future developers, however, these are words/concepts that appeared confusing at some point or other(even if some are actually simple once understood).
There are 3(or 4) ways in which a C API PyObject can be linked to a Jython PyObject conceptually. The details of adding types are given on this page.
section 4.1 https://arxiv.org/pdf/1404.6390.pdf
section 4.2 https://arxiv.org/pdf/1404.6390.pdf
section 4.3 https://arxiv.org/pdf/1404.6390.pdf
Partial mirroring involves mirroring part of an object while delegating as much to Jython as possible. This involves keeping some part of the memory in sync, to do this all memory up to and including the part that is being sync'ed must be allocated and included in truncate_trailing
in the builtintypes map.
This is effectively a pointer to a java object, it is helpful to read a guide on JNI to understand this. It is distinct from primitive types (eg jint) or jstring.
This is the Jython implementation of a PyObject, when discussing C code, the "Jython PyObject" is of type jobject in C. The jobject points to the java side object of type PyDictionary
or other subclass of org.python.core.PyObject
This is the object that the C API expects to have available.
This is explained in section 4.4 of https://arxiv.org/pdf/1404.6390.pdf and in this issue Essentially, it is the object used to convert between Jython PyObjects and PyObjects it contains the jobject for the relevant Jython PyObject, the relevant PyObject and some meta information.
This often just means using JNI to call the relevant Jython method that will perform the expected function on the right object. In the case of objects, delegating basically means all of the C methods just call into Jython via JNI and the object's data is stored in Jython. Basically there is only a façade in C which calls into Jython where everything really is.
This is the global interpreter lock, it is to do with how python handles threading.