]> granicus.if.org Git - postgresql/commitdiff
Hide unused variable warnings under Python 3
authorPeter Eisentraut <peter_e@gmx.net>
Thu, 18 Aug 2011 08:40:30 +0000 (11:40 +0300)
committerPeter Eisentraut <peter_e@gmx.net>
Thu, 18 Aug 2011 09:59:42 +0000 (12:59 +0300)
src/pl/plpython/plpython.c

index 3d1f0436026ba0b8b4887c5cc96bc9ef1a5df3ab..b981dec7c2ec8b89b90be2ddbaf5ed1ad2410782 100644 (file)
@@ -4170,7 +4170,9 @@ PLy_init_plpy(void)
        PyObject   *main_mod,
                           *main_dict,
                           *plpy_mod;
+#if PY_MAJOR_VERSION < 3
        PyObject   *plpy;
+#endif
 
        /*
         * initialize plpy module
@@ -4183,7 +4185,7 @@ PLy_init_plpy(void)
                elog(ERROR, "could not initialize PLy_SubtransactionType");
 
 #if PY_MAJOR_VERSION >= 3
-       plpy = PyModule_Create(&PLy_module);
+       PyModule_Create(&PLy_module);
        /* for Python 3 we initialized the exceptions in PyInit_plpy */
 #else
        plpy = Py_InitModule("plpy", PLy_methods);