Move all Python initialization code into a new global

PyXPCOM_EnsurePythonEnvironment.  At the same time remove the old, dead
code behind PYXPCOM_USE_PYGILSTATE and LOADER_LINKS_WITH_PYTHON.
Not part of the default build.


git-svn-id: svn://10.0.0.236/trunk@194111 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mhammond%skippinet.com.au
2006-04-11 06:12:14 +00:00
parent dcae2e2005
commit 42d97d027f
5 changed files with 163 additions and 496 deletions

View File

@@ -142,8 +142,6 @@ PyG_Base::PyG_Base(PyObject *instance, const nsIID &iid)
#endif // DEBUG_LIFETIMES
Py_XINCREF(instance); // instance should never be NULL - but what's an X between friends!
PyXPCOM_DLLAddRef();
#ifdef DEBUG_FULL
LogF("PyGatewayBase: created %s", m_pPyObject ? m_pPyObject->ob_type->tp_name : "<NULL>");
#endif
@@ -169,7 +167,6 @@ PyG_Base::~PyG_Base()
p->m_pBase = nsnull;
m_pWeakRef = nsnull;
}
PyXPCOM_DLLRelease();
}
// Get the correct interface pointer for this object given the IID.