[Python-checkins] cpython: Fix Windows build
brian.curtin
python-checkins at python.org
Sat Apr 14 21:20:43 CEST 2012
http://hg.python.org/cpython/rev/c5da5a2a9262
changeset: 76307:c5da5a2a9262
parent: 76305:b85818a836e3
user: Brian Curtin <brian at python.org>
date: Sat Apr 14 14:19:33 2012 -0500
summary:
Fix Windows build
files:
Python/import.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Python/import.c b/Python/import.c
--- a/Python/import.c
+++ b/Python/import.c
@@ -2963,7 +2963,7 @@
Py_INCREF(abs_name);
}
-#if WITH_THREAD
+#ifdef WITH_THREAD
_PyImport_AcquireLock();
#endif
/* From this point forward, goto error_with_unlock! */
@@ -2999,13 +2999,14 @@
if (PyObject_Not(fromlist)) {
if (level == 0 || PyUnicode_GET_LENGTH(name) > 0) {
PyObject *front = NULL;
+ PyObject *partition = NULL;
PyObject *borrowed_dot = _PyUnicode_FromId(&single_dot);
if (borrowed_dot == NULL) {
goto error_with_unlock;
}
- PyObject *partition = PyUnicode_Partition(name, borrowed_dot);
+ partition = PyUnicode_Partition(name, borrowed_dot);
if (partition == NULL) {
goto error_with_unlock;
}
@@ -3043,7 +3044,7 @@
NULL);
}
error_with_unlock:
-#if WITH_THREAD
+#ifdef WITH_THREAD
if (_PyImport_ReleaseLock() < 0) {
PyErr_SetString(PyExc_RuntimeError, "not holding the import lock");
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list