diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_collectionsmodule.c | 4 | ||||
-rw-r--r-- | Modules/_fileio.c | 7 | ||||
-rw-r--r-- | Modules/cPickle.c | 8 |
3 files changed, 14 insertions, 5 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 37633d2..0029532 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -967,7 +967,7 @@ deque_iter(dequeobject *deque) it->deque = deque; it->state = deque->state; it->counter = deque->len; - _PyObject_GC_TRACK(it); + PyObject_GC_Track(it); return (PyObject *)it; } @@ -1077,7 +1077,7 @@ deque_reviter(dequeobject *deque) it->deque = deque; it->state = deque->state; it->counter = deque->len; - _PyObject_GC_TRACK(it); + PyObject_GC_Track(it); return (PyObject *)it; } diff --git a/Modules/_fileio.c b/Modules/_fileio.c index ca12822..2dc3d74 100644 --- a/Modules/_fileio.c +++ b/Modules/_fileio.c @@ -265,10 +265,11 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds) Py_END_ALLOW_THREADS if (self->fd < 0) { #ifdef MS_WINDOWS - PyErr_SetFromErrnoWithUnicodeFilename(PyExc_IOError, widename); -#else - PyErr_SetFromErrnoWithFilename(PyExc_IOError, name); + if (widename != NULL) + PyErr_SetFromErrnoWithUnicodeFilename(PyExc_IOError, widename); + else #endif + PyErr_SetFromErrnoWithFilename(PyExc_IOError, name); goto error; } if(dircheck(self, name) < 0) diff --git a/Modules/cPickle.c b/Modules/cPickle.c index 18baee1..7f836c3 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -18,6 +18,14 @@ PyDoc_STRVAR(cPickle_module_documentation, #define HIGHEST_PROTOCOL 2 /* + * Note: The UNICODE macro controls the TCHAR meaning of the win32 API. Since + * all headers have already been included here, we can safely redefine it. + */ +#ifdef UNICODE +# undef UNICODE +#endif + +/* * Pickle opcodes. These must be kept in synch with pickle.py. Extensive * docs are in pickletools.py. */ |