From 4c966d920fb75a5d0366b887c2ef28e6d87c1eda Mon Sep 17 00:00:00 2001
From: Andrew Dunstan <andrew@dunslane.net>
Date: Tue, 1 Mar 2011 18:59:31 -0500
Subject: [PATCH] Fix plpython breakage detected on certain Fedora machines on
 buildfarm.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Patch from Jan UrbaƄski.
---
 src/pl/plpython/plpython.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c
index 4cc0708dcb9..a2ebd22428c 100644
--- a/src/pl/plpython/plpython.c
+++ b/src/pl/plpython/plpython.c
@@ -3936,6 +3936,7 @@ PLy_add_exceptions(PyObject *plpy)
 #endif
 	if (PyModule_AddObject(plpy, "spiexceptions", excmod) < 0)
 		PLy_elog(ERROR, "failed to add the spiexceptions module");
+	Py_INCREF(excmod);
 
 	PLy_exc_error = PyErr_NewException("plpy.Error", NULL, NULL);
 	PLy_exc_fatal = PyErr_NewException("plpy.Fatal", NULL, NULL);
-- 
GitLab