From d85c11ee4d4a146de3d31a7aff2fc8284a5bc6ca Mon Sep 17 00:00:00 2001 From: "mhammond%skippinet.com.au" Date: Wed, 30 Jul 2003 23:10:31 +0000 Subject: [PATCH] Tweak so it still builds with Python 2.2. Not part of the build. git-svn-id: svn://10.0.0.236/trunk@145401 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/extensions/python/xpcom/src/loader/pyloader.cpp | 2 +- mozilla/extensions/python/xpcom/src/xpcom.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/extensions/python/xpcom/src/loader/pyloader.cpp b/mozilla/extensions/python/xpcom/src/loader/pyloader.cpp index 5aa74830844..d595651098c 100644 --- a/mozilla/extensions/python/xpcom/src/loader/pyloader.cpp +++ b/mozilla/extensions/python/xpcom/src/loader/pyloader.cpp @@ -105,7 +105,7 @@ void AddStandardPaths() // And now try and get Python to process this directory as a "site dir" // - ie, look for .pth files, etc nsCAutoString cmdBuf(NS_LITERAL_CSTRING("import site;site.addsitedir(r'") + pathCBuf + NS_LITERAL_CSTRING("')\n")); - if (0 != PyRun_SimpleString(cmdBuf.get())) { + if (0 != PyRun_SimpleString((char *)cmdBuf.get())) { LogError("The directory '%s' could not be added as a site directory", pathCBuf.get()); PyErr_Clear(); } diff --git a/mozilla/extensions/python/xpcom/src/xpcom.cpp b/mozilla/extensions/python/xpcom/src/xpcom.cpp index 95b5953246e..cbb6aabe8bf 100644 --- a/mozilla/extensions/python/xpcom/src/xpcom.cpp +++ b/mozilla/extensions/python/xpcom/src/xpcom.cpp @@ -53,7 +53,7 @@ extern void AddDefaultGateway(PyObject *instance, nsISupports *gateway); #define LOADER_LINKS_WITH_PYTHON -#ifndef LOADER_LINKS_WITH_PYTHON +#ifndef PYXPCOM_USE_PYGILSTATE extern void PyXPCOM_InterpreterState_Ensure(); #endif