add missing static storage specifiers
authorLisandro Dalcin <dalcinl@gmail.com>
Thu, 16 Dec 2010 23:19:10 +0000 (20:19 -0300)
committerLisandro Dalcin <dalcinl@gmail.com>
Thu, 16 Dec 2010 23:19:10 +0000 (20:19 -0300)
Cython/Compiler/ExprNodes.py
Cython/Compiler/ModuleNode.py

index cea32d7bd44615c4733aec0eead9ef5a0d921db6..2ecddeb4356a0ad7db0a02fb39c8b2097509477a 100755 (executable)
@@ -8182,17 +8182,17 @@ typedef struct {
     PyCFunctionObject func;
 } %(binding_cfunc)s_object;
 
-PyTypeObject %(binding_cfunc)s_type;
-PyTypeObject *%(binding_cfunc)s = NULL;
+static PyTypeObject %(binding_cfunc)s_type;
+static PyTypeObject *%(binding_cfunc)s = NULL;
 
-PyObject *%(binding_cfunc)s_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module); /* proto */
+static PyObject *%(binding_cfunc)s_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module); /* proto */
 #define %(binding_cfunc)s_New(ml, self) %(binding_cfunc)s_NewEx(ml, self, NULL)
 
-int %(binding_cfunc)s_init(void); /* proto */
+static int %(binding_cfunc)s_init(void); /* proto */
 """ % Naming.__dict__,
 impl="""
 
-PyObject *%(binding_cfunc)s_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module) {
+static PyObject *%(binding_cfunc)s_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module) {
        %(binding_cfunc)s_object *op = PyObject_GC_New(%(binding_cfunc)s_object, %(binding_cfunc)s);
     if (op == NULL)
         return NULL;
@@ -8218,7 +8218,7 @@ static PyObject *%(binding_cfunc)s_descr_get(PyObject *func, PyObject *obj, PyOb
        return PyMethod_New(func, obj, type);
 }
 
-int %(binding_cfunc)s_init(void) {
+static int %(binding_cfunc)s_init(void) {
     %(binding_cfunc)s_type = PyCFunction_Type;
     %(binding_cfunc)s_type.tp_name = __Pyx_NAMESTR("cython_binding_builtin_function_or_method");
     %(binding_cfunc)s_type.tp_dealloc = (destructor)%(binding_cfunc)s_dealloc;
index 523bb8826139e7c59ef740d2605bde6959d853bc..45feb266fce2b7dec78b9db971449c2fa29232b0 100644 (file)
@@ -264,7 +264,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
 
         code = globalstate['before_global_var']
         code.putln('#define __Pyx_MODULE_NAME "%s"' % self.full_module_name)
-        code.putln("int %s%s = 0;" % (Naming.module_is_main, self.full_module_name.replace('.', '__')))
+        code.putln("static int %s%s = 0;" % (Naming.module_is_main, self.full_module_name.replace('.', '__')))
         code.putln("")
         code.putln("/* Implementation of %s */" % env.qualified_name)