|
@@ -18,6 +18,7 @@
|
|
|
#include "pythonLoaderFileType.h"
|
|
#include "pythonLoaderFileType.h"
|
|
|
|
|
|
|
|
extern struct Dtool_PyTypedObject Dtool_LoaderFileType;
|
|
extern struct Dtool_PyTypedObject Dtool_LoaderFileType;
|
|
|
|
|
+extern struct Dtool_PyTypedObject Dtool_LoaderFileTypeRegistry;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Registers a loader file type that is implemented in Python.
|
|
* Registers a loader file type that is implemented in Python.
|
|
@@ -112,4 +113,13 @@ unregister_type(PyObject *type) {
|
|
|
Py_XDECREF(save_func);
|
|
Py_XDECREF(save_func);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * Implements pickle support.
|
|
|
|
|
+ */
|
|
|
|
|
+PyObject *Extension<LoaderFileTypeRegistry>::
|
|
|
|
|
+__reduce__() const {
|
|
|
|
|
+ PyObject *func = PyObject_GetAttrString((PyObject *)&Dtool_LoaderFileTypeRegistry, "get_global_ptr");
|
|
|
|
|
+ return Py_BuildValue("N()", func);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
#endif
|
|
#endif
|