[Python-checkins] r83865 - in python/branches/import_unicode: Include/Python.h Python/import.c
victor.stinner
python-checkins at python.org
Mon Aug 9 01:11:27 CEST 2010
Author: victor.stinner
Date: Mon Aug 9 01:11:27 2010
New Revision: 83865
Log:
_Py_stat() is no more static
Modified:
python/branches/import_unicode/Include/Python.h
python/branches/import_unicode/Python/import.c
Modified: python/branches/import_unicode/Include/Python.h
==============================================================================
--- python/branches/import_unicode/Include/Python.h (original)
+++ python/branches/import_unicode/Include/Python.h Mon Aug 9 01:11:27 2010
@@ -132,8 +132,11 @@
PyAPI_FUNC(wchar_t *) _Py_char2wchar(char *);
PyAPI_FUNC(char*) _Py_wchar2char(const wchar_t *text);
-/* _Py_fopen lives in import.c */
+/* _Py_stat and _Py_fopen live in import.c */
PyAPI_FUNC(FILE*) _Py_fopen(PyObject *unicode, const char *mode);
+#ifdef HAVE_STAT
+int _Py_stat(PyObject *unicode, struct stat *statbuf);
+#endif
#ifdef __cplusplus
}
Modified: python/branches/import_unicode/Python/import.c
==============================================================================
--- python/branches/import_unicode/Python/import.c (original)
+++ python/branches/import_unicode/Python/import.c Mon Aug 9 01:11:27 2010
@@ -139,7 +139,7 @@
/* Forward */
FILE* _Py_fopen(PyObject *unicode, const char *mode);
#ifdef HAVE_STAT
-static int _Py_stat(PyObject *unicode, struct stat *statbuf);
+int _Py_stat(PyObject *unicode, struct stat *statbuf);
static int find_init_module(PyObject *);
#endif
@@ -2165,7 +2165,7 @@
#ifdef HAVE_STAT
-static int
+int
_Py_stat(PyObject *unicode, struct stat *statbuf)
{
#ifdef MS_WINDOWS
@@ -3869,8 +3869,7 @@
/* it exists */
if (S_ISDIR(statbuf.st_mode)) {
/* it's a directory */
- PyErr_SetString(PyExc_ImportError,
- "existing directory");
+ PyErr_SetString(PyExc_ImportError, "existing directory");
return -1;
}
}
@@ -3905,8 +3904,7 @@
/* it exists */
if (rv & FILE_ATTRIBUTE_DIRECTORY) {
/* it's a directory */
- PyErr_SetString(PyExc_ImportError,
- "existing directory");
+ PyErr_SetString(PyExc_ImportError, "existing directory");
return -1;
}
}
More information about the Python-checkins
mailing list