[Python-checkins] cpython: capitialize enum members

benjamin.peterson python-checkins at python.org
Fri May 25 19:26:49 CEST 2012


http://hg.python.org/cpython/rev/4a6df7a2dd9d
changeset:   77144:4a6df7a2dd9d
user:        Benjamin Peterson <benjamin at python.org>
date:        Fri May 25 10:22:29 2012 -0700
summary:
  capitialize enum members

files:
  Modules/zipimport.c |  34 ++++++++++++++++----------------
  1 files changed, 17 insertions(+), 17 deletions(-)


diff --git a/Modules/zipimport.c b/Modules/zipimport.c
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -320,10 +320,10 @@
 }
 
 typedef enum {
-    fl_error,
-    fl_not_found,
-    fl_module_found,
-    fl_ns_found
+    FL_ERROR,
+    FL_NOT_FOUND,
+    FL_MODULE_FOUND,
+    FL_NS_FOUND
 } find_loader_result;
 
 /* The guts of "find_loader" and "find_module". Return values:
@@ -341,7 +341,7 @@
 
     mi = get_module_info(self, fullname);
     if (mi == MI_ERROR)
-        return fl_error;
+        return FL_ERROR;
     if (mi == MI_NOT_FOUND) {
         /* Not a module or regular package. See if this is a directory, and
            therefore possibly a portion of a namespace package. */
@@ -356,13 +356,13 @@
                                                       self->archive, SEP,
                                                       self->prefix, fullname);
             if (*namespace_portion == NULL)
-                return fl_error;
-            return fl_ns_found;
+                return FL_ERROR;
+            return FL_NS_FOUND;
         }
-        return fl_not_found;
+        return FL_NOT_FOUND;
     }
     /* This is a module or package. */
-    return fl_module_found;
+    return FL_MODULE_FOUND;
 }
 
 
@@ -381,16 +381,16 @@
         return NULL;
 
     switch (find_loader(self, fullname, &namespace_portion)) {
-    case fl_error:
+    case FL_ERROR:
         return NULL;
-    case fl_ns_found:
+    case FL_NS_FOUND:
         /* A namespace portion is not allowed via find_module, so return None. */
         Py_DECREF(namespace_portion);
         /* FALL THROUGH */
-    case fl_not_found:
+    case FL_NOT_FOUND:
         result = Py_None;
         break;
-    case fl_module_found:
+    case FL_MODULE_FOUND:
         result = (PyObject *)self;
         break;
     }
@@ -417,15 +417,15 @@
         return NULL;
 
     switch (find_loader(self, fullname, &namespace_portion)) {
-    case fl_error:
+    case FL_ERROR:
         return NULL;
-    case fl_not_found:        /* Not found, return (None, []) */
+    case FL_NOT_FOUND:        /* Not found, return (None, []) */
         result = Py_BuildValue("O[]", Py_None);
         break;
-    case fl_module_found:     /* Return (self, []) */
+    case FL_MODULE_FOUND:     /* Return (self, []) */
         result = Py_BuildValue("O[]", self);
         break;
-    case fl_ns_found:         /* Return (None, [namespace_portion]) */
+    case FL_NS_FOUND:         /* Return (None, [namespace_portion]) */
         result = Py_BuildValue("O[O]", Py_None, namespace_portion);
         Py_DECREF(namespace_portion);
         return result;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list