[Python-checkins] r78530 - python/branches/py3k/Python/import.c
brett.cannon
python-checkins at python.org
Mon Mar 1 03:09:17 CET 2010
Author: brett.cannon
Date: Mon Mar 1 03:09:17 2010
New Revision: 78530
Log:
Strip out trailing whitespace.
Modified:
python/branches/py3k/Python/import.c
Modified: python/branches/py3k/Python/import.c
==============================================================================
--- python/branches/py3k/Python/import.c (original)
+++ python/branches/py3k/Python/import.c Mon Mar 1 03:09:17 2010
@@ -19,7 +19,7 @@
#include <fcntl.h>
#endif
#ifdef __cplusplus
-extern "C" {
+extern "C" {
#endif
#ifdef MS_WINDOWS
@@ -530,7 +530,7 @@
dictionary is stored by calling _PyImport_FixupExtension()
immediately after the module initialization function succeeds. A
copy can be retrieved from there by calling
- _PyImport_FindExtension().
+ _PyImport_FindExtension().
Modules which do support multiple multiple initialization set
their m_size field to a non-negative number (indicating the size
@@ -566,7 +566,7 @@
}
if (def->m_size == -1) {
if (def->m_base.m_copy) {
- /* Somebody already imported the module,
+ /* Somebody already imported the module,
likely under a different name.
XXX this should really not happen. */
Py_DECREF(def->m_base.m_copy);
@@ -624,7 +624,7 @@
PySys_WriteStderr("import %s # previously loaded (%s)\n",
name, filename);
return mod;
-
+
}
@@ -862,7 +862,7 @@
flags.cf_flags = 0;
mod = PyParser_ASTFromFile(fp, pathname, NULL,
- Py_file_input, 0, 0, &flags,
+ Py_file_input, 0, 0, &flags,
NULL, arena);
if (mod) {
co = PyAST_Compile(mod, pathname, NULL, arena);
@@ -920,7 +920,7 @@
mode_t mode = srcstat->st_mode & ~S_IEXEC;
#else
mode_t mode = srcstat->st_mode & ~S_IXUSR & ~S_IXGRP & ~S_IXOTH;
-#endif
+#endif
fp = open_exclusive(cpathname, mode);
if (fp == NULL) {
@@ -1010,7 +1010,7 @@
char *cpathname;
PyCodeObject *co;
PyObject *m;
-
+
if (fstat(fileno(fp), &st) != 0) {
PyErr_Format(PyExc_RuntimeError,
"unable to get file status from '%s'",
@@ -1383,7 +1383,7 @@
if (!v)
return NULL;
if (PyUnicode_Check(v)) {
- v = PyUnicode_AsEncodedString(v,
+ v = PyUnicode_AsEncodedString(v,
Py_FileSystemDefaultEncoding, NULL);
if (v == NULL)
return NULL;
@@ -1456,7 +1456,7 @@
else {
char warnstr[MAXPATHLEN+80];
sprintf(warnstr, "Not importing directory "
- "'%.*s': missing __init__.py",
+ "'%.*s': missing __init__.py",
MAXPATHLEN, buf);
if (PyErr_WarnEx(PyExc_ImportWarning,
warnstr, 1)) {
@@ -2270,7 +2270,7 @@
modname = PyDict_GetItem(globals, namestr);
if (modname == NULL || !PyUnicode_Check(modname))
return Py_None;
-
+
modpath = PyDict_GetItem(globals, pathstr);
if (modpath != NULL) {
/* __path__ is set, so modname is already the package name */
@@ -2643,7 +2643,7 @@
struct filedescr *fdp;
FILE *fp = NULL;
PyObject *newm;
-
+
if (modules_reloading == NULL) {
Py_FatalError("PyImport_ReloadModule: "
"no modules_reloading dictionary!");
@@ -3039,8 +3039,8 @@
PyObject *m;
FILE *fp;
if (!PyArg_ParseTuple(args, "ses|O:load_compiled",
- &name,
- Py_FileSystemDefaultEncoding, &pathname,
+ &name,
+ Py_FileSystemDefaultEncoding, &pathname,
&fob))
return NULL;
fp = get_file(pathname, fob, "rb");
@@ -3065,8 +3065,8 @@
PyObject *m;
FILE *fp = NULL;
if (!PyArg_ParseTuple(args, "ses|O:load_dynamic",
- &name,
- Py_FileSystemDefaultEncoding, &pathname,
+ &name,
+ Py_FileSystemDefaultEncoding, &pathname,
&fob))
return NULL;
if (fob) {
@@ -3094,7 +3094,7 @@
PyObject *m;
FILE *fp;
if (!PyArg_ParseTuple(args, "ses|O:load_source",
- &name,
+ &name,
Py_FileSystemDefaultEncoding, &pathname,
&fob))
return NULL;
@@ -3122,7 +3122,7 @@
FILE *fp;
if (!PyArg_ParseTuple(args, "sOes(ssi):load_module",
- &name, &fob,
+ &name, &fob,
Py_FileSystemDefaultEncoding, &pathname,
&suffix, &mode, &type))
return NULL;
@@ -3146,7 +3146,7 @@
PyMem_Free(pathname);
return NULL;
}
- }
+ }
ret = load_module(name, fp, pathname, type, NULL);
PyMem_Free(pathname);
if (fp)
@@ -3160,7 +3160,7 @@
char *name;
char *pathname;
PyObject * ret;
- if (!PyArg_ParseTuple(args, "ses:load_package",
+ if (!PyArg_ParseTuple(args, "ses:load_package",
&name, Py_FileSystemDefaultEncoding, &pathname))
return NULL;
ret = load_package(name, pathname);
More information about the Python-checkins
mailing list