From aae8bf627270d9b81d17f4b8d5921d193a65b77f Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Thu, 16 Dec 2010 20:19:10 -0300 Subject: [PATCH] add missing static storage specifiers --- Cython/Compiler/ExprNodes.py | 12 ++++++------ Cython/Compiler/ModuleNode.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index cea32d7b..2ecddeb4 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -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; diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 523bb882..45feb266 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -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) -- 2.26.2