From d9eb8a1b6a857f52f986f0c5b464b2fba9777bed Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 14 Dec 2012 14:34:30 +0000 Subject: [PATCH] * ./hurricane/src/isobar: - Bug: In PyHurricane, PyTypeViaLayer was *not* reference incremented, causing the type to be desallocated when the Python interpreter was finalizing. This was causing to fail. --- hurricane/src/isobar/PyHurricane.cpp | 4 +++- hurricane/src/isobar/hurricane/isobar/PyHurricane.h | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hurricane/src/isobar/PyHurricane.cpp b/hurricane/src/isobar/PyHurricane.cpp index aa799fb3..24c2182c 100644 --- a/hurricane/src/isobar/PyHurricane.cpp +++ b/hurricane/src/isobar/PyHurricane.cpp @@ -727,8 +727,10 @@ extern "C" { PyModule_AddObject ( module, "DiffusionLayer" , (PyObject*)&PyTypeDiffusionLayer ); Py_INCREF ( &PyTypeTransistorLayer ); PyModule_AddObject ( module, "TransistorLayer" , (PyObject*)&PyTypeTransistorLayer ); - Py_INCREF ( &PyTypeContactLayer ); + Py_INCREF ( &PyTypeViaLayer ); PyModule_AddObject ( module, "ViaLayer" , (PyObject*)&PyTypeViaLayer ); + Py_INCREF ( &PyTypeContactLayer ); + PyModule_AddObject ( module, "ContactLayer" , (PyObject*)&PyTypeContactLayer ); Py_INCREF ( &PyTypeNetExternalComponents ); PyModule_AddObject ( module, "NetExternalComponents", (PyObject*)&PyTypeNetExternalComponents ); Py_INCREF ( &PyTypeUpdateSession ); diff --git a/hurricane/src/isobar/hurricane/isobar/PyHurricane.h b/hurricane/src/isobar/hurricane/isobar/PyHurricane.h index 9314a4d3..97bba964 100644 --- a/hurricane/src/isobar/hurricane/isobar/PyHurricane.h +++ b/hurricane/src/isobar/hurricane/isobar/PyHurricane.h @@ -19,6 +19,9 @@ #ifndef __PYHURRICANE__ #define __PYHURRICANE__ +// Enable Python debugging. +// #define DEBUG 1 + #include "Python.h" #include #include