diff --git a/bora/src/PyBora.cpp b/bora/src/PyBora.cpp index 13affc7e..f2f40072 100644 --- a/bora/src/PyBora.cpp +++ b/bora/src/PyBora.cpp @@ -34,6 +34,7 @@ namespace Bora { using std::cerr; using std::endl; using Hurricane::tab; + using Isobar::getPyHash; using Isobar::__cs; using CRL::PyTypeToolEngine; using CRL::PyTypeGraphicTool; diff --git a/bora/src/PyBoraEngine.cpp b/bora/src/PyBoraEngine.cpp index a0162be5..27df7451 100644 --- a/bora/src/PyBoraEngine.cpp +++ b/bora/src/PyBoraEngine.cpp @@ -39,6 +39,7 @@ namespace Bora { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::PyCell; diff --git a/crlcore/etc/symbolic/cmos45/kite.py b/crlcore/etc/symbolic/cmos45/kite.py index 89d6ce2f..11b9d69b 100644 --- a/crlcore/etc/symbolic/cmos45/kite.py +++ b/crlcore/etc/symbolic/cmos45/kite.py @@ -181,7 +181,7 @@ rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL3') # meta , 2 # depth. , 0.0 # density (deprecated). , l(0) # track offset from AB. - , l(8) # track pitch. + , l(10) # track pitch. , l(3) # wire width. , l(2) # VIA side (that is VIA12). , l(8) # obstacle dW. diff --git a/crlcore/src/pyCRL/PyAcmSigda.cpp b/crlcore/src/pyCRL/PyAcmSigda.cpp index e6180a74..b31fe739 100644 --- a/crlcore/src/pyCRL/PyAcmSigda.cpp +++ b/crlcore/src/pyCRL/PyAcmSigda.cpp @@ -39,6 +39,7 @@ namespace CRL { using Isobar::HurricaneWarning; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; + using Isobar::getPyHash; using Isobar::__cs; using Isobar::PyCell_Link; diff --git a/crlcore/src/pyCRL/PyAllianceFramework.cpp b/crlcore/src/pyCRL/PyAllianceFramework.cpp index fb293cb6..fc77e22c 100644 --- a/crlcore/src/pyCRL/PyAllianceFramework.cpp +++ b/crlcore/src/pyCRL/PyAllianceFramework.cpp @@ -44,6 +44,7 @@ namespace CRL { using Isobar::HurricaneError; using Isobar::HurricaneWarning; using Isobar::PyAny_AsLong; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::PyLibrary; diff --git a/crlcore/src/pyCRL/PyAllianceLibrary.cpp b/crlcore/src/pyCRL/PyAllianceLibrary.cpp index 73068fd3..62228546 100644 --- a/crlcore/src/pyCRL/PyAllianceLibrary.cpp +++ b/crlcore/src/pyCRL/PyAllianceLibrary.cpp @@ -38,6 +38,7 @@ namespace CRL { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::__cs; @@ -111,7 +112,7 @@ extern "C" { PythonOnlyDeleteMethod(AllianceLibrary) - DirectHashMethod(PyAllianceLibrary_Hash, PyAllianceLibrary) + DirectHashMethod(PyAllianceLibrary_Hash, AllianceLibrary) extern void PyAllianceLibrary_LinkPyType() { cdebug_log(30,0) << "PyAllianceLibrary_LinkType()" << endl; diff --git a/crlcore/src/pyCRL/PyBanner.cpp b/crlcore/src/pyCRL/PyBanner.cpp index 931cf261..e50aa560 100644 --- a/crlcore/src/pyCRL/PyBanner.cpp +++ b/crlcore/src/pyCRL/PyBanner.cpp @@ -37,6 +37,7 @@ namespace CRL { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::__cs; @@ -177,7 +178,7 @@ extern "C" { PythonOnlyDeleteMethod(Banner) - DirectHashMethod(PyBanner_Hash, PyBanner) + DirectHashMethod(PyBanner_Hash, Banner) extern void PyBanner_LinkPyType() { cdebug_log(30,0) << "PyBanner_LinkType()" << endl; diff --git a/crlcore/src/pyCRL/PyBlif.cpp b/crlcore/src/pyCRL/PyBlif.cpp index 945f87b5..5c55cceb 100644 --- a/crlcore/src/pyCRL/PyBlif.cpp +++ b/crlcore/src/pyCRL/PyBlif.cpp @@ -38,6 +38,7 @@ namespace CRL { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::__cs; diff --git a/crlcore/src/pyCRL/PyCRL.cpp b/crlcore/src/pyCRL/PyCRL.cpp index a5508871..4d5691cb 100644 --- a/crlcore/src/pyCRL/PyCRL.cpp +++ b/crlcore/src/pyCRL/PyCRL.cpp @@ -54,6 +54,7 @@ namespace CRL { using Isobar::HurricaneError; using Isobar::HurricaneWarning; using Isobar::__cs; + using Isobar::getPyHash; using Vhdl::EntityExtension; diff --git a/crlcore/src/pyCRL/PyCatalog.cpp b/crlcore/src/pyCRL/PyCatalog.cpp index 051e6e9e..9db1d02e 100644 --- a/crlcore/src/pyCRL/PyCatalog.cpp +++ b/crlcore/src/pyCRL/PyCatalog.cpp @@ -44,6 +44,7 @@ namespace CRL { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::PyLibrary; diff --git a/crlcore/src/pyCRL/PyCatalogState.cpp b/crlcore/src/pyCRL/PyCatalogState.cpp index 26a41f8d..c7541771 100644 --- a/crlcore/src/pyCRL/PyCatalogState.cpp +++ b/crlcore/src/pyCRL/PyCatalogState.cpp @@ -36,6 +36,7 @@ namespace CRL { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::PyLibrary; @@ -108,10 +109,10 @@ extern "C" { PythonOnlyDeleteMethod(CatalogState) - DirectReprMethod(PyCatalogState_Repr, PyCatalogState, Catalog::State) - DirectStrMethod (PyCatalogState_Str, PyCatalogState, Catalog::State) - DirectCmpMethod (PyCatalogState_Cmp, IsPyCatalogState, PyCatalogState) - DirectHashMethod(PyCatalogState_Hash, PyCatalogState) + DirectReprMethod (PyCatalogState_Repr, PyCatalogState, Catalog::State) + DirectStrMethod (PyCatalogState_Str, PyCatalogState, Catalog::State) + DirectCmpByPtrMethod(PyCatalogState_Cmp, IsPyCatalogState, PyCatalogState) + DirectHashMethod (PyCatalogState_Hash, CatalogState) extern void PyCatalogState_LinkPyType() { cdebug_log(30,0) << "PyCatalogState_LinkType()" << endl; diff --git a/crlcore/src/pyCRL/PyCellGauge.cpp b/crlcore/src/pyCRL/PyCellGauge.cpp index 84eadbe2..7212665c 100644 --- a/crlcore/src/pyCRL/PyCellGauge.cpp +++ b/crlcore/src/pyCRL/PyCellGauge.cpp @@ -36,6 +36,7 @@ namespace CRL { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::__cs; diff --git a/crlcore/src/pyCRL/PyConstant.cpp b/crlcore/src/pyCRL/PyConstant.cpp index 38466be0..a6559536 100644 --- a/crlcore/src/pyCRL/PyConstant.cpp +++ b/crlcore/src/pyCRL/PyConstant.cpp @@ -33,6 +33,7 @@ namespace Constant { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::__cs; diff --git a/crlcore/src/pyCRL/PyDefImport.cpp b/crlcore/src/pyCRL/PyDefImport.cpp index 74046cae..b724023a 100644 --- a/crlcore/src/pyCRL/PyDefImport.cpp +++ b/crlcore/src/pyCRL/PyDefImport.cpp @@ -38,6 +38,7 @@ namespace CRL { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::__cs; diff --git a/crlcore/src/pyCRL/PyEnvironment.cpp b/crlcore/src/pyCRL/PyEnvironment.cpp index 4910dd6a..45c80d19 100644 --- a/crlcore/src/pyCRL/PyEnvironment.cpp +++ b/crlcore/src/pyCRL/PyEnvironment.cpp @@ -36,6 +36,7 @@ namespace CRL { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::__cs; @@ -262,7 +263,7 @@ extern "C" { PythonOnlyDeleteMethod(Environment) - DirectHashMethod(PyEnvironment_Hash, PyEnvironment) + DirectHashMethod(PyEnvironment_Hash, Environment) extern void PyEnvironment_LinkPyType() { cdebug_log(30,0) << "PyEnvironment_LinkType()" << endl; diff --git a/crlcore/src/pyCRL/PyGds.cpp b/crlcore/src/pyCRL/PyGds.cpp index 7ae459b4..de3eaaa1 100644 --- a/crlcore/src/pyCRL/PyGds.cpp +++ b/crlcore/src/pyCRL/PyGds.cpp @@ -38,6 +38,7 @@ namespace CRL { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::__cs; diff --git a/crlcore/src/pyCRL/PyIspd05.cpp b/crlcore/src/pyCRL/PyIspd05.cpp index 04ea6e80..08b48362 100644 --- a/crlcore/src/pyCRL/PyIspd05.cpp +++ b/crlcore/src/pyCRL/PyIspd05.cpp @@ -38,6 +38,7 @@ namespace CRL { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::__cs; diff --git a/crlcore/src/pyCRL/PyLefImport.cpp b/crlcore/src/pyCRL/PyLefImport.cpp index 69f2b54f..213ab34e 100644 --- a/crlcore/src/pyCRL/PyLefImport.cpp +++ b/crlcore/src/pyCRL/PyLefImport.cpp @@ -38,6 +38,7 @@ namespace CRL { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::__cs; diff --git a/crlcore/src/pyCRL/PyRoutingGauge.cpp b/crlcore/src/pyCRL/PyRoutingGauge.cpp index 7e155ef8..cd7e4f35 100644 --- a/crlcore/src/pyCRL/PyRoutingGauge.cpp +++ b/crlcore/src/pyCRL/PyRoutingGauge.cpp @@ -40,6 +40,7 @@ namespace CRL { using Isobar::HurricaneError; using Isobar::HurricaneWarning; using Isobar::PyAny_AsLong; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::__cs; diff --git a/crlcore/src/pyCRL/PyRoutingLayerGauge.cpp b/crlcore/src/pyCRL/PyRoutingLayerGauge.cpp index bf2a9a10..9f5ef06e 100644 --- a/crlcore/src/pyCRL/PyRoutingLayerGauge.cpp +++ b/crlcore/src/pyCRL/PyRoutingLayerGauge.cpp @@ -37,6 +37,7 @@ namespace CRL { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::__cs; diff --git a/crlcore/src/pyCRL/PySystem.cpp b/crlcore/src/pyCRL/PySystem.cpp index e3bc4dd2..8f12f509 100644 --- a/crlcore/src/pyCRL/PySystem.cpp +++ b/crlcore/src/pyCRL/PySystem.cpp @@ -37,6 +37,7 @@ namespace CRL { using Isobar::HurricaneError; using Isobar::HurricaneWarning; using Isobar::PyAny_AsLong; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; diff --git a/crlcore/src/pyCRL/PyToolBox.cpp b/crlcore/src/pyCRL/PyToolBox.cpp index db2f98e0..fc4eccae 100644 --- a/crlcore/src/pyCRL/PyToolBox.cpp +++ b/crlcore/src/pyCRL/PyToolBox.cpp @@ -44,6 +44,7 @@ namespace CRL { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::PyCell; diff --git a/etesian/src/PyEtesian.cpp b/etesian/src/PyEtesian.cpp index 53074106..37a882cd 100644 --- a/etesian/src/PyEtesian.cpp +++ b/etesian/src/PyEtesian.cpp @@ -27,6 +27,7 @@ namespace Etesian { using std::endl; using Hurricane::tab; using Isobar::__cs; + using Isobar::getPyHash; using CRL::PyTypeToolEngine; using CRL::PyTypeGraphicTool; diff --git a/etesian/src/PyEtesianEngine.cpp b/etesian/src/PyEtesianEngine.cpp index a62dd36a..cbac3131 100644 --- a/etesian/src/PyEtesianEngine.cpp +++ b/etesian/src/PyEtesianEngine.cpp @@ -45,6 +45,7 @@ namespace Etesian { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::PyCell; diff --git a/hurricane/src/analog/PyLayoutGenerator.cpp b/hurricane/src/analog/PyLayoutGenerator.cpp index 1c4b592d..0eb49f5a 100644 --- a/hurricane/src/analog/PyLayoutGenerator.cpp +++ b/hurricane/src/analog/PyLayoutGenerator.cpp @@ -26,13 +26,6 @@ namespace Isobar { using std::endl; using std::hex; using std::ostringstream; - using Isobar::ProxyProperty; - using Isobar::ProxyError; - using Isobar::ConstructorError; - using Isobar::HurricaneError; - using Isobar::HurricaneWarning; - using Isobar::ParseOneArg; - using Isobar::ParseTwoArg; using namespace Analog; @@ -315,7 +308,7 @@ extern "C" { DirectDeleteMethod(PyLayoutGenerator_DeAlloc,PyLayoutGenerator) - DirectHashMethod(PyLayoutGenerator_Hash, PyLayoutGenerator) + DirectHashMethod(PyLayoutGenerator_Hash,LayoutGenerator) extern void PyLayoutGenerator_LinkPyType() { cdebug.log(49) << "PyLayoutGenerator_LinkType()" << endl; diff --git a/hurricane/src/isobar/PyBox.cpp b/hurricane/src/isobar/PyBox.cpp index 6dd1617c..dcfc7d16 100644 --- a/hurricane/src/isobar/PyBox.cpp +++ b/hurricane/src/isobar/PyBox.cpp @@ -58,9 +58,6 @@ extern "C" { DirectDestroyAttribute(PyBox_destroy, PyBox) - // --------------------------------------------------------------- - // Class Method : "PyBox_NEW ()" - static PyObject* PyBox_NEW (PyObject *module, PyObject *args) { cdebug_log(20,0) << "PyBox_NEW()" << endl; @@ -150,9 +147,6 @@ extern "C" { } - // --------------------------------------------------------------- - // Attribute Method : "PyBox_getIntersection ()" - static PyObject* PyBox_getIntersection ( PyBox *self, PyObject* args ) { cdebug_log(20,0) << "PyBox_getIntersection()" << endl; @@ -175,9 +169,6 @@ extern "C" { } - // --------------------------------------------------------------- - // Attribute Method : "PyBox_contains ()" - static PyObject* PyBox_contains ( PyBox *self, PyObject* args ) { cdebug_log(20,0) << "PyBox_contains ()" << endl; @@ -210,8 +201,6 @@ extern "C" { } } - // --------------------------------------------------------------- - // Attribute Method : "PyBox_intersect ()" static PyObject* PyBox_intersect ( PyBox *self, PyObject* args ) { cdebug_log(20,0) << "PyBox_intersect ()" << endl; @@ -238,11 +227,6 @@ extern "C" { } - - - // --------------------------------------------------------------- - // Attribute Method : "PyBox_isConstrainedBy ()" - static PyObject* PyBox_isConstrainedBy ( PyBox *self, PyObject* args ) { cdebug_log(20,0) << "PyBox_isConstrainedBy ()" << endl; @@ -267,11 +251,6 @@ extern "C" { } - - - // --------------------------------------------------------------- - // Attribute Method : "PyBox_makeEmpty ()" - static PyObject* PyBox_makeEmpty ( PyBox *self, PyObject* args ) { cdebug_log(20,0) << "PyBox_makeEmpty ()" << endl; @@ -285,8 +264,6 @@ extern "C" { return (PyObject*)self; } - // --------------------------------------------------------------- - // Attribute Method : "PyBox_inflate ()" static PyObject* PyBox_inflate ( PyBox *self, PyObject* args ) { cdebug_log(20,0) << "PyBox_inflate ()" << endl; @@ -322,8 +299,6 @@ extern "C" { return ( (PyObject*)self ); } - // --------------------------------------------------------------- - // Attribute Method : "PyBox_merge ()" static PyObject* PyBox_merge ( PyBox *self, PyObject* args ) { cdebug_log(20,0) << "Box_merge()" << endl; @@ -360,8 +335,6 @@ extern "C" { return ( (PyObject*)self ); } - // --------------------------------------------------------------- - // Attribute Method : "PyBox_translate ()" static PyObject* PyBox_translate ( PyBox *self, PyObject* args ) { cdebug_log(20,0) << "PyBox_translate ()" << endl; @@ -387,8 +360,6 @@ extern "C" { } - - // --------------------------------------------------------------- // PyBox Attribute Method table. @@ -421,25 +392,22 @@ extern "C" { , {NULL, NULL, 0, NULL} /* sentinel */ }; - // x-------------------------------------------------------------x + + // +-------------------------------------------------------------+ // | "PyBox" Object Methods | - // x-------------------------------------------------------------x + // +-------------------------------------------------------------+ DirectDeleteMethod(PyBox_DeAlloc,PyBox) - PyTypeObjectLinkPyTypeNewInit(Box) -//PyTypeObjectLinkPyType(Box) + PyTypeObjectLinkPyTypeAsValue(Box) #else // End of Python Module Code Part. -// x=================================================================x +// +=================================================================+ // | "PyBox" Shared Library Code Part | -// x=================================================================x +// +=================================================================+ - - // --------------------------------------------------------------- - // PyBox Object Definitions. PyTypeObjectDefinitions(Box) diff --git a/hurricane/src/isobar/PyMaterial.cpp b/hurricane/src/isobar/PyMaterial.cpp index 9c8b518f..30b8b37e 100644 --- a/hurricane/src/isobar/PyMaterial.cpp +++ b/hurricane/src/isobar/PyMaterial.cpp @@ -140,7 +140,7 @@ extern "C" { return 1; } - DirectHashMethod (PyMaterial_Hash , PyMaterial) + DirectHashMethod (PyMaterial_Hash , Material) DirectReprMethod (PyMaterial_Repr , PyMaterial, BasicLayer::Material) DirectStrMethod (PyMaterial_Str , PyMaterial, BasicLayer::Material) DirectDeleteMethod(PyMaterial_DeAlloc, PyMaterial) diff --git a/hurricane/src/isobar/PyNetDirection.cpp b/hurricane/src/isobar/PyNetDirection.cpp index 85468bcd..42d45203 100644 --- a/hurricane/src/isobar/PyNetDirection.cpp +++ b/hurricane/src/isobar/PyNetDirection.cpp @@ -62,10 +62,10 @@ extern "C" { PythonOnlyDeleteMethod(NetDirection) - DirectReprMethod(PyNetDirection_Repr, PyNetDirection, Net::Direction) - DirectStrMethod (PyNetDirection_Str, PyNetDirection, Net::Direction) - DirectCmpMethod (PyNetDirection_Cmp, IsPyNetDirection, PyNetDirection) - DirectHashMethod(PyNetDirection_Hash, PyNetDirection) + DirectReprMethod (PyNetDirection_Repr, PyNetDirection, Net::Direction) + DirectStrMethod (PyNetDirection_Str, PyNetDirection, Net::Direction) + DirectCmpByValueMethod(PyNetDirection_Cmp, IsPyNetDirection, PyNetDirection) + DirectHashMethod (PyNetDirection_Hash, NetDirection) extern void PyNetDirection_LinkPyType() { cdebug_log(20,0) << "PyNetDirection_LinkType()" << endl; diff --git a/hurricane/src/isobar/PyNetType.cpp b/hurricane/src/isobar/PyNetType.cpp index c97d937b..621ff026 100644 --- a/hurricane/src/isobar/PyNetType.cpp +++ b/hurricane/src/isobar/PyNetType.cpp @@ -61,10 +61,10 @@ extern "C" { PythonOnlyDeleteMethod(NetType) - DirectReprMethod(PyNetType_Repr, PyNetType, Net::Type) - DirectStrMethod (PyNetType_Str, PyNetType, Net::Type) - DirectCmpMethod (PyNetType_Cmp, IsPyNetType, PyNetType) - DirectHashMethod(PyNetType_Hash, PyNetType) + DirectReprMethod (PyNetType_Repr, PyNetType, Net::Type) + DirectStrMethod (PyNetType_Str, PyNetType, Net::Type) + DirectCmpByValueMethod(PyNetType_Cmp, IsPyNetType, PyNetType) + DirectHashMethod (PyNetType_Hash, NetType) extern void PyNetType_LinkPyType() { cdebug_log(20,0) << "PyNetType_LinkType()" << endl; diff --git a/hurricane/src/isobar/PyOrientation.cpp b/hurricane/src/isobar/PyOrientation.cpp index f4476d66..f0af3e90 100644 --- a/hurricane/src/isobar/PyOrientation.cpp +++ b/hurricane/src/isobar/PyOrientation.cpp @@ -66,10 +66,10 @@ extern "C" { PythonOnlyDeleteMethod(Orientation) - DirectReprMethod(PyOrientation_Repr, PyOrientation, Transformation::Orientation) - DirectStrMethod (PyOrientation_Str, PyOrientation, Transformation::Orientation) - DirectCmpMethod (PyOrientation_Cmp, IsPyOrientation, PyOrientation) - DirectHashMethod(PyOrientation_Hash, PyOrientation) + DirectReprMethod (PyOrientation_Repr, PyOrientation, Transformation::Orientation) + DirectStrMethod (PyOrientation_Str, PyOrientation, Transformation::Orientation) + DirectCmpByValueMethod(PyOrientation_Cmp, IsPyOrientation, PyOrientation) + DirectHashMethod (PyOrientation_Hash, Orientation) extern void PyOrientation_LinkPyType() { cdebug_log(20,0) << "PyOrientation_LinkType()" << endl; diff --git a/hurricane/src/isobar/PyPinDirection.cpp b/hurricane/src/isobar/PyPinDirection.cpp index a58ad73e..15b67f66 100644 --- a/hurricane/src/isobar/PyPinDirection.cpp +++ b/hurricane/src/isobar/PyPinDirection.cpp @@ -62,10 +62,10 @@ extern "C" { PythonOnlyDeleteMethod(PinDirection) - DirectReprMethod(PyPinDirection_Repr, PyPinDirection, Pin::AccessDirection) - DirectStrMethod (PyPinDirection_Str, PyPinDirection, Pin::AccessDirection) - DirectCmpMethod (PyPinDirection_Cmp, IsPyPinDirection, PyPinDirection) - DirectHashMethod(PyPinDirection_Hash, PyPinDirection) + DirectReprMethod (PyPinDirection_Repr, PyPinDirection, Pin::AccessDirection) + DirectStrMethod (PyPinDirection_Str, PyPinDirection, Pin::AccessDirection) + DirectCmpByValueMethod(PyPinDirection_Cmp, IsPyPinDirection, PyPinDirection) + DirectHashMethod (PyPinDirection_Hash, PinDirection) extern void PyPinDirection_LinkPyType() { cdebug_log(20,0) << "PyPinDirection_LinkType()" << endl; diff --git a/hurricane/src/isobar/PyPinPlacementStatus.cpp b/hurricane/src/isobar/PyPinPlacementStatus.cpp index 78b5747e..38252882 100644 --- a/hurricane/src/isobar/PyPinPlacementStatus.cpp +++ b/hurricane/src/isobar/PyPinPlacementStatus.cpp @@ -62,10 +62,10 @@ extern "C" { PythonOnlyDeleteMethod(PinPlacementStatus) - DirectReprMethod(PyPinPlacementStatus_Repr, PyPinPlacementStatus, Pin::PlacementStatus) - DirectStrMethod (PyPinPlacementStatus_Str, PyPinPlacementStatus, Pin::PlacementStatus) - DirectCmpMethod (PyPinPlacementStatus_Cmp, IsPyPinPlacementStatus, PyPinPlacementStatus) - DirectHashMethod(PyPinPlacementStatus_Hash, PyPinPlacementStatus) + DirectReprMethod (PyPinPlacementStatus_Repr, PyPinPlacementStatus, Pin::PlacementStatus) + DirectStrMethod (PyPinPlacementStatus_Str, PyPinPlacementStatus, Pin::PlacementStatus) + DirectCmpByValueMethod(PyPinPlacementStatus_Cmp, IsPyPinPlacementStatus, PyPinPlacementStatus) + DirectHashMethod (PyPinPlacementStatus_Hash, PinPlacementStatus) extern void PyPinPlacementStatus_LinkPyType() { cdebug_log(20,0) << "PyPinPlacementStatus_LinkType()" << endl; diff --git a/hurricane/src/isobar/PyPlacementStatus.cpp b/hurricane/src/isobar/PyPlacementStatus.cpp index b7c57e1d..502e2802 100644 --- a/hurricane/src/isobar/PyPlacementStatus.cpp +++ b/hurricane/src/isobar/PyPlacementStatus.cpp @@ -66,10 +66,10 @@ extern "C" { PythonOnlyDeleteMethod(PlacementStatus) - DirectReprMethod(PyPlacementStatus_Repr, PyPlacementStatus, Instance::PlacementStatus) - DirectStrMethod (PyPlacementStatus_Str, PyPlacementStatus, Instance::PlacementStatus) - DirectCmpMethod (PyPlacementStatus_Cmp, IsPyPlacementStatus, PyPlacementStatus) - DirectHashMethod(PyPlacementStatus_Hash, PyPlacementStatus) + DirectReprMethod (PyPlacementStatus_Repr, PyPlacementStatus, Instance::PlacementStatus) + DirectStrMethod (PyPlacementStatus_Str, PyPlacementStatus, Instance::PlacementStatus) + DirectCmpByValueMethod(PyPlacementStatus_Cmp, IsPyPlacementStatus, PyPlacementStatus) + DirectHashMethod (PyPlacementStatus_Hash, PlacementStatus) extern void PyPlacementStatus_LinkPyType() { cdebug_log(20,0) << "PyPlacementStatus_LinkType()" << endl; diff --git a/hurricane/src/isobar/hurricane/isobar/PyHurricane.h b/hurricane/src/isobar/hurricane/isobar/PyHurricane.h index 465620fb..44715b9b 100644 --- a/hurricane/src/isobar/hurricane/isobar/PyHurricane.h +++ b/hurricane/src/isobar/hurricane/isobar/PyHurricane.h @@ -22,6 +22,7 @@ // #define DEBUG 1 #include "Python.h" +#include #include #include #include @@ -42,6 +43,7 @@ namespace Isobar { using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; + using Hurricane::DBo; // ------------------------------------------------------------------- @@ -165,6 +167,14 @@ namespace Isobar { inline PyObject* PyDbU_FromLong ( T unit ) { return PyLong_FromLongLong( unit ); } + template< typename T , typename enable_if::value,int>::type = 0 > + static int getPyHash ( T* cppObject ) { return cppObject->getId(); } + + + template< typename T , typename enable_if::value,int>::type = 0 > + static int getPyHash ( T* cppObject ) { return (long)cppObject; } + + extern "C" { @@ -1116,29 +1126,45 @@ extern "C" { // ------------------------------------------------------------------- -// Attribute Method For Cmp. +// Attribute Method For Cmp, compare pointer value (unicity) -# define DirectCmpMethod(PY_FUNC_NAME,IS_PY_OBJECT,PY_SELF_TYPE) \ +# define DirectCmpByPtrMethod(PY_FUNC_NAME,IS_PY_OBJECT,PY_SELF_TYPE) \ static int PY_FUNC_NAME ( PY_SELF_TYPE *self, PyObject* other ) \ { \ - if ( ! IS_PY_OBJECT(other) ) { return ( -1 ); } \ + if (not IS_PY_OBJECT(other)) return -1; \ \ - PY_SELF_TYPE* otherPyObject = (PY_SELF_TYPE *)other; \ - if ( self->ACCESS_OBJECT == otherPyObject->ACCESS_OBJECT ) return ( 0 ); \ - if ( self->ACCESS_OBJECT < otherPyObject->ACCESS_OBJECT ) return ( -1 ); \ + PY_SELF_TYPE* otherPyObject = (PY_SELF_TYPE*)other; \ + if (self->ACCESS_OBJECT == otherPyObject->ACCESS_OBJECT) return 0; \ + if (self->ACCESS_OBJECT < otherPyObject->ACCESS_OBJECT) return -1; \ \ - return ( 1 ); \ + return 1; \ + } + + + + +// ------------------------------------------------------------------- +// Attribute Method For Cmp, compare object contents + +# define DirectCmpByValueMethod(PY_FUNC_NAME,IS_PY_OBJECT,PY_SELF_TYPE) \ + static int PY_FUNC_NAME ( PY_SELF_TYPE *self, PyObject* other ) \ + { \ + if (not IS_PY_OBJECT(other)) return -1; \ + \ + PY_SELF_TYPE* otherPyObject = (PY_SELF_TYPE*)other; \ + if (*(self->ACCESS_OBJECT) == *(otherPyObject->ACCESS_OBJECT)) return 0; \ + if ( self->ACCESS_OBJECT < otherPyObject->ACCESS_OBJECT ) return -1; \ + \ + return 1; \ } // ------------------------------------------------------------------- // Attribute Method For Hash. -# define DirectHashMethod(PY_FUNC_NAME,PY_SELF_TYPE) \ - static int PY_FUNC_NAME ( PY_SELF_TYPE *self) \ - { \ - return (long)self->ACCESS_OBJECT; \ - } +# define DirectHashMethod(PY_FUNC_NAME,SELF_TYPE) \ + static int PY_FUNC_NAME ( Py##SELF_TYPE* self ) \ + { return getPyHash( self->ACCESS_OBJECT ); } // ------------------------------------------------------------------- @@ -1297,39 +1323,39 @@ extern "C" { // ------------------------------------------------------------------- // Initialisation Function for PyTypeObject Runtime Link. -#define PyTypeObjectLinkPyTypeWithClass(PY_SELF_TYPE,SELF_TYPE) \ - DirectReprMethod(Py##PY_SELF_TYPE##_Repr, Py##PY_SELF_TYPE, SELF_TYPE) \ - DirectStrMethod (Py##PY_SELF_TYPE##_Str, Py##PY_SELF_TYPE, SELF_TYPE) \ - DirectCmpMethod (Py##PY_SELF_TYPE##_Cmp, IsPy##PY_SELF_TYPE, Py##PY_SELF_TYPE) \ - DirectHashMethod(Py##PY_SELF_TYPE##_Hash, Py##SELF_TYPE) \ - extern void Py##PY_SELF_TYPE##_LinkPyType() { \ - cdebug_log(20,0) << "Py" #PY_SELF_TYPE "_LinkType()" << endl; \ - \ - PyType##PY_SELF_TYPE.tp_dealloc = (destructor) Py##PY_SELF_TYPE##_DeAlloc; \ - PyType##PY_SELF_TYPE.tp_compare = (cmpfunc) Py##PY_SELF_TYPE##_Cmp; \ - PyType##PY_SELF_TYPE.tp_repr = (reprfunc) Py##PY_SELF_TYPE##_Repr; \ - PyType##PY_SELF_TYPE.tp_str = (reprfunc) Py##PY_SELF_TYPE##_Str; \ - PyType##PY_SELF_TYPE.tp_hash = (hashfunc) Py##PY_SELF_TYPE##_Hash; \ - PyType##PY_SELF_TYPE.tp_methods = Py##PY_SELF_TYPE##_Methods; \ +#define PyTypeObjectLinkPyTypeWithClass(PY_SELF_TYPE,SELF_TYPE) \ + DirectReprMethod (Py##PY_SELF_TYPE##_Repr, Py##PY_SELF_TYPE, SELF_TYPE) \ + DirectStrMethod (Py##PY_SELF_TYPE##_Str, Py##PY_SELF_TYPE, SELF_TYPE) \ + DirectCmpByPtrMethod(Py##PY_SELF_TYPE##_Cmp, IsPy##PY_SELF_TYPE, Py##PY_SELF_TYPE) \ + DirectHashMethod (Py##PY_SELF_TYPE##_Hash, SELF_TYPE) \ + extern void Py##PY_SELF_TYPE##_LinkPyType() { \ + cdebug_log(20,0) << "Py" #PY_SELF_TYPE "_LinkType()" << endl; \ + \ + PyType##PY_SELF_TYPE.tp_dealloc = (destructor) Py##PY_SELF_TYPE##_DeAlloc; \ + PyType##PY_SELF_TYPE.tp_compare = (cmpfunc) Py##PY_SELF_TYPE##_Cmp; \ + PyType##PY_SELF_TYPE.tp_repr = (reprfunc) Py##PY_SELF_TYPE##_Repr; \ + PyType##PY_SELF_TYPE.tp_str = (reprfunc) Py##PY_SELF_TYPE##_Str; \ + PyType##PY_SELF_TYPE.tp_hash = (hashfunc) Py##PY_SELF_TYPE##_Hash; \ + PyType##PY_SELF_TYPE.tp_methods = Py##PY_SELF_TYPE##_Methods; \ } -#define PyTypeObjectLinkPyTypeWithClassNewInit(PY_SELF_TYPE,SELF_TYPE) \ - DirectReprMethod(Py##PY_SELF_TYPE##_Repr, Py##PY_SELF_TYPE, SELF_TYPE) \ - DirectStrMethod (Py##PY_SELF_TYPE##_Str, Py##PY_SELF_TYPE, SELF_TYPE) \ - DirectCmpMethod (Py##PY_SELF_TYPE##_Cmp, IsPy##PY_SELF_TYPE, Py##PY_SELF_TYPE) \ - DirectHashMethod(Py##PY_SELF_TYPE##_Hash, Py##SELF_TYPE) \ - extern void Py##PY_SELF_TYPE##_LinkPyType() { \ - cdebug_log(20,0) << "Py" #PY_SELF_TYPE "_LinkType()" << endl; \ - \ - PyType##PY_SELF_TYPE.tp_dealloc = (destructor) Py##PY_SELF_TYPE##_DeAlloc; \ - PyType##PY_SELF_TYPE.tp_compare = (cmpfunc) Py##PY_SELF_TYPE##_Cmp; \ - PyType##PY_SELF_TYPE.tp_repr = (reprfunc) Py##PY_SELF_TYPE##_Repr; \ - PyType##PY_SELF_TYPE.tp_str = (reprfunc) Py##PY_SELF_TYPE##_Str; \ - PyType##PY_SELF_TYPE.tp_hash = (hashfunc) Py##PY_SELF_TYPE##_Hash; \ - PyType##PY_SELF_TYPE.tp_new = (newfunc) Py##PY_SELF_TYPE##_NEW; \ - PyType##PY_SELF_TYPE.tp_init = (initproc) Py##PY_SELF_TYPE##_Init; \ - PyType##PY_SELF_TYPE.tp_methods = Py##PY_SELF_TYPE##_Methods; \ +#define PyTypeObjectLinkPyTypeWithClassNewInit(PY_SELF_TYPE,SELF_TYPE) \ + DirectReprMethod (Py##PY_SELF_TYPE##_Repr, Py##PY_SELF_TYPE, SELF_TYPE) \ + DirectStrMethod (Py##PY_SELF_TYPE##_Str, Py##PY_SELF_TYPE, SELF_TYPE) \ + DirectCmpByPtrMethod (Py##PY_SELF_TYPE##_Cmp, IsPy##PY_SELF_TYPE, Py##PY_SELF_TYPE) \ + DirectHashMethod (Py##PY_SELF_TYPE##_Hash, SELF_TYPE) \ + extern void Py##PY_SELF_TYPE##_LinkPyType() { \ + cdebug_log(20,0) << "Py" #PY_SELF_TYPE "_LinkType()" << endl; \ + \ + PyType##PY_SELF_TYPE.tp_dealloc = (destructor) Py##PY_SELF_TYPE##_DeAlloc; \ + PyType##PY_SELF_TYPE.tp_compare = (cmpfunc) Py##PY_SELF_TYPE##_Cmp; \ + PyType##PY_SELF_TYPE.tp_repr = (reprfunc) Py##PY_SELF_TYPE##_Repr; \ + PyType##PY_SELF_TYPE.tp_str = (reprfunc) Py##PY_SELF_TYPE##_Str; \ + PyType##PY_SELF_TYPE.tp_hash = (hashfunc) Py##PY_SELF_TYPE##_Hash; \ + PyType##PY_SELF_TYPE.tp_new = (newfunc) Py##PY_SELF_TYPE##_NEW; \ + PyType##PY_SELF_TYPE.tp_init = (initproc) Py##PY_SELF_TYPE##_Init; \ + PyType##PY_SELF_TYPE.tp_methods = Py##PY_SELF_TYPE##_Methods; \ } @@ -1340,20 +1366,39 @@ extern "C" { PyTypeObjectLinkPyTypeWithClassNewInit(SELF_TYPE,SELF_TYPE) +#define PyTypeObjectLinkPyTypeAsValue(SELF_TYPE) \ + DirectReprMethod (Py##SELF_TYPE##_Repr, Py##SELF_TYPE, SELF_TYPE) \ + DirectStrMethod (Py##SELF_TYPE##_Str, Py##SELF_TYPE, SELF_TYPE) \ + DirectCmpByValueMethod(Py##SELF_TYPE##_Cmp, IsPy##SELF_TYPE, Py##SELF_TYPE) \ + DirectHashMethod (Py##SELF_TYPE##_Hash, SELF_TYPE) \ + extern void Py##SELF_TYPE##_LinkPyType() { \ + cdebug_log(20,0) << "Py" #SELF_TYPE "_LinkType()" << endl; \ + \ + PyType##SELF_TYPE.tp_dealloc = (destructor) Py##SELF_TYPE##_DeAlloc; \ + PyType##SELF_TYPE.tp_compare = (cmpfunc) Py##SELF_TYPE##_Cmp; \ + PyType##SELF_TYPE.tp_repr = (reprfunc) Py##SELF_TYPE##_Repr; \ + PyType##SELF_TYPE.tp_str = (reprfunc) Py##SELF_TYPE##_Str; \ + PyType##SELF_TYPE.tp_hash = (hashfunc) Py##SELF_TYPE##_Hash; \ + PyType##SELF_TYPE.tp_new = (newfunc) Py##SELF_TYPE##_NEW; \ + PyType##SELF_TYPE.tp_init = (initproc) Py##SELF_TYPE##_Init; \ + PyType##SELF_TYPE.tp_methods = Py##SELF_TYPE##_Methods; \ + } + + // Special Initialisation Function for Locator PyTypeObject Runtime Link. -#define LocatorPyTypeObjectLinkPyType(PY_SELF_TYPE, SELF_TYPE) \ - DirectReprMethod(Py##PY_SELF_TYPE##Locator_Repr, Py##PY_SELF_TYPE##Locator, Locator) \ - DirectStrMethod (Py##PY_SELF_TYPE##Locator_Str, Py##PY_SELF_TYPE##Locator, Locator) \ - DirectCmpMethod (Py##PY_SELF_TYPE##Locator_Cmp, IsPy##PY_SELF_TYPE##Locator, Py##PY_SELF_TYPE##Locator) \ - extern void Py##PY_SELF_TYPE##Locator_LinkPyType () \ - { \ - cdebug_log(20,0) << "Py" #PY_SELF_TYPE "Locator_LinkType()" << endl; \ - \ - PyType##PY_SELF_TYPE##Locator.tp_dealloc = (destructor)Py##PY_SELF_TYPE##Locator_DeAlloc; \ - PyType##PY_SELF_TYPE##Locator.tp_compare = (cmpfunc) Py##PY_SELF_TYPE##Locator_Cmp; \ - PyType##PY_SELF_TYPE##Locator.tp_repr = (reprfunc) Py##PY_SELF_TYPE##Locator_Repr; \ - PyType##PY_SELF_TYPE##Locator.tp_str = (reprfunc) Py##PY_SELF_TYPE##Locator_Str; \ - PyType##PY_SELF_TYPE##Locator.tp_methods = Py##PY_SELF_TYPE##Locator_Methods; \ +#define LocatorPyTypeObjectLinkPyType(PY_SELF_TYPE, SELF_TYPE) \ + DirectReprMethod (Py##PY_SELF_TYPE##Locator_Repr, Py##PY_SELF_TYPE##Locator, Locator) \ + DirectStrMethod (Py##PY_SELF_TYPE##Locator_Str, Py##PY_SELF_TYPE##Locator, Locator) \ + DirectCmpByPtrMethod(Py##PY_SELF_TYPE##Locator_Cmp, IsPy##PY_SELF_TYPE##Locator, Py##PY_SELF_TYPE##Locator) \ + extern void Py##PY_SELF_TYPE##Locator_LinkPyType () \ + { \ + cdebug_log(20,0) << "Py" #PY_SELF_TYPE "Locator_LinkType()" << endl; \ + \ + PyType##PY_SELF_TYPE##Locator.tp_dealloc = (destructor)Py##PY_SELF_TYPE##Locator_DeAlloc; \ + PyType##PY_SELF_TYPE##Locator.tp_compare = (cmpfunc) Py##PY_SELF_TYPE##Locator_Cmp; \ + PyType##PY_SELF_TYPE##Locator.tp_repr = (reprfunc) Py##PY_SELF_TYPE##Locator_Repr; \ + PyType##PY_SELF_TYPE##Locator.tp_str = (reprfunc) Py##PY_SELF_TYPE##Locator_Str; \ + PyType##PY_SELF_TYPE##Locator.tp_methods = Py##PY_SELF_TYPE##Locator_Methods; \ } #define PyTypeObjectDefinitions(SELF_TYPE) \ diff --git a/hurricane/src/viewer/PyDisplayStyle.cpp b/hurricane/src/viewer/PyDisplayStyle.cpp index 170add69..b3378da4 100644 --- a/hurricane/src/viewer/PyDisplayStyle.cpp +++ b/hurricane/src/viewer/PyDisplayStyle.cpp @@ -41,6 +41,7 @@ namespace Hurricane { using Isobar::HurricaneWarning; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; + using Isobar::getPyHash; extern "C" { @@ -374,7 +375,7 @@ extern "C" { PythonOnlyDeleteMethod(DisplayStyle) - DirectHashMethod(PyDisplayStyle_Hash, PyDisplayStyle) + DirectHashMethod(PyDisplayStyle_Hash, DisplayStyle) extern void PyDisplayStyle_LinkPyType() { cdebug_log(20,0) << "PyDisplayStyle_LinkType()" << endl; diff --git a/hurricane/src/viewer/PyDrawingGroup.cpp b/hurricane/src/viewer/PyDrawingGroup.cpp index 11e4ea84..5a6c7901 100644 --- a/hurricane/src/viewer/PyDrawingGroup.cpp +++ b/hurricane/src/viewer/PyDrawingGroup.cpp @@ -38,6 +38,7 @@ namespace Hurricane { using Isobar::HurricaneWarning; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; + using Isobar::getPyHash; extern "C" { @@ -184,7 +185,7 @@ extern "C" { PythonOnlyDeleteMethod(DrawingGroup) - DirectHashMethod(PyDrawingGroup_Hash, PyDrawingGroup) + DirectHashMethod(PyDrawingGroup_Hash, DrawingGroup) extern void PyDrawingGroup_LinkPyType() { cdebug_log(20,0) << "PyDrawingGroup_LinkType()" << endl; diff --git a/hurricane/src/viewer/PyDrawingStyle.cpp b/hurricane/src/viewer/PyDrawingStyle.cpp index 79d6fd77..5e06d587 100644 --- a/hurricane/src/viewer/PyDrawingStyle.cpp +++ b/hurricane/src/viewer/PyDrawingStyle.cpp @@ -30,6 +30,7 @@ namespace Hurricane { using Isobar::HurricaneWarning; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; + using Isobar::getPyHash; extern "C" { diff --git a/hurricane/src/viewer/PyGraphics.cpp b/hurricane/src/viewer/PyGraphics.cpp index a729c202..5d07875b 100644 --- a/hurricane/src/viewer/PyGraphics.cpp +++ b/hurricane/src/viewer/PyGraphics.cpp @@ -33,6 +33,7 @@ namespace Hurricane { using Isobar::HurricaneWarning; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; + using Isobar::getPyHash; extern "C" { diff --git a/hurricane/src/viewer/PyHApplication.cpp b/hurricane/src/viewer/PyHApplication.cpp index fcc541e4..18f4c09f 100644 --- a/hurricane/src/viewer/PyHApplication.cpp +++ b/hurricane/src/viewer/PyHApplication.cpp @@ -36,6 +36,7 @@ namespace Hurricane { using Isobar::HurricaneWarning; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; + using Isobar::getPyHash; extern "C" { diff --git a/hurricane/src/viewer/PyHSVr.cpp b/hurricane/src/viewer/PyHSVr.cpp index cc45d07d..070636a4 100644 --- a/hurricane/src/viewer/PyHSVr.cpp +++ b/hurricane/src/viewer/PyHSVr.cpp @@ -34,18 +34,20 @@ namespace Hurricane { using Isobar::HurricaneWarning; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; + using Isobar::getPyHash; + typedef DisplayStyle::HSVr HSVr; extern "C" { -#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(DisplayStyle::HSVr,hsvr,function) +#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(HSVr,hsvr,function) #if defined(__PYTHON_MODULE__) // +=================================================================+ -// | "PyHSVr" Python Module Code Part | +// | "PyHSVr" Python Module Code Part | // +=================================================================+ @@ -53,8 +55,8 @@ extern "C" { { cdebug_log(20,0) << "PyHSVr_new()" << endl; - DisplayStyle::HSVr* hsvr = NULL; - PyHSVr* pyHSVr = (PyHSVr*)type->tp_alloc(type,0); + HSVr* hsvr = NULL; + PyHSVr* pyHSVr = (PyHSVr*)type->tp_alloc(type,0); HTRY if ( pyHSVr ) { @@ -62,7 +64,7 @@ extern "C" { float saturation = 1.0; float value = 1.0; if (PyArg_ParseTuple(args,"fff:HSVr.new", &hue, &saturation, &value)) { - hsvr = new DisplayStyle::HSVr(hue,saturation,value); + hsvr = new HSVr(hue,saturation,value); } else { PyErr_SetString ( ConstructorError, "invalid number of parameters for HSVr()." ); return NULL; @@ -77,7 +79,7 @@ extern "C" { static PyObject* PyHSVr_Repr ( PyHSVr* self ) { - DisplayStyle::HSVr* hsvr = self->_object; + HSVr* hsvr = self->_object; if ( hsvr == NULL ) return PyString_FromString(""); @@ -92,15 +94,15 @@ extern "C" { // Standart Accessors (Attributes). - DirectGetDoubleAttribute(PyHSVr_GetHue ,getHue ,PyHSVr,DisplayStyle::HSVr) - DirectGetDoubleAttribute(PyHSVr_GetSaturation,getSaturation,PyHSVr,DisplayStyle::HSVr) - DirectGetDoubleAttribute(PyHSVr_GetValue ,getValue ,PyHSVr,DisplayStyle::HSVr) - DirectSetDoubleAttribute(PyHSVr_SetHue ,setHue ,PyHSVr,DisplayStyle::HSVr) - DirectSetDoubleAttribute(PyHSVr_SetSaturation,setSaturation,PyHSVr,DisplayStyle::HSVr) - DirectSetDoubleAttribute(PyHSVr_SetValue ,setValue ,PyHSVr,DisplayStyle::HSVr) + DirectGetDoubleAttribute(PyHSVr_GetHue ,getHue ,PyHSVr,HSVr) + DirectGetDoubleAttribute(PyHSVr_GetSaturation,getSaturation,PyHSVr,HSVr) + DirectGetDoubleAttribute(PyHSVr_GetValue ,getValue ,PyHSVr,HSVr) + DirectSetDoubleAttribute(PyHSVr_SetHue ,setHue ,PyHSVr,HSVr) + DirectSetDoubleAttribute(PyHSVr_SetSaturation,setSaturation,PyHSVr,HSVr) + DirectSetDoubleAttribute(PyHSVr_SetValue ,setValue ,PyHSVr,HSVr) // Standart Predicates (Attributes). - DirectGetBoolAttribute(PyHSVr_IsId,isId,PyHSVr,DisplayStyle::HSVr) + DirectGetBoolAttribute(PyHSVr_IsId,isId,PyHSVr,HSVr) PyMethodDef PyHSVr_Methods[] = @@ -116,7 +118,7 @@ extern "C" { DirectDeleteMethod(PyHSVr_DeAlloc,PyHSVr) - DirectHashMethod(PyHSVr_Hash, PyHSVr) + DirectHashMethod(PyHSVr_Hash,HSVr) extern void PyHSVr_LinkPyType() { cdebug_log(20,0) << "PyHSVr_LinkType()" << endl; @@ -137,7 +139,7 @@ extern "C" { // +=================================================================+ // Link/Creation Method. - PyObject* PyHSVr_Link ( DisplayStyle::HSVr* object ) + PyObject* PyHSVr_Link ( HSVr* object ) { if ( object == NULL ) Py_RETURN_NONE; diff --git a/hurricane/src/viewer/PyViewer.cpp b/hurricane/src/viewer/PyViewer.cpp index 12f997f3..895bf516 100644 --- a/hurricane/src/viewer/PyViewer.cpp +++ b/hurricane/src/viewer/PyViewer.cpp @@ -29,6 +29,7 @@ namespace Hurricane { using std::cerr; using std::endl; using Isobar::__cs; + using Isobar::getPyHash; #if !defined(__PYTHON_MODULE__) diff --git a/katana/src/PyKatana.cpp b/katana/src/PyKatana.cpp index 784fb2dd..fdf6d796 100644 --- a/katana/src/PyKatana.cpp +++ b/katana/src/PyKatana.cpp @@ -27,6 +27,7 @@ namespace Katana { using std::cerr; using std::endl; using Hurricane::tab; + using Isobar::getPyHash; using Isobar::__cs; using CRL::PyTypeToolEngine; using CRL::PyTypeGraphicTool; diff --git a/katana/src/PyKatanaEngine.cpp b/katana/src/PyKatanaEngine.cpp index b6cf4092..3f7dc83f 100644 --- a/katana/src/PyKatanaEngine.cpp +++ b/katana/src/PyKatanaEngine.cpp @@ -49,6 +49,7 @@ namespace Katana { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::PyNet; diff --git a/katana/src/PyKatanaFlags.cpp b/katana/src/PyKatanaFlags.cpp index 70e8b3a6..b42f9ae0 100644 --- a/katana/src/PyKatanaFlags.cpp +++ b/katana/src/PyKatanaFlags.cpp @@ -31,6 +31,7 @@ namespace Katana { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; @@ -61,10 +62,10 @@ extern "C" { PythonOnlyDeleteMethod(KatanaFlags) - DirectReprMethod(PyKatanaFlags_Repr, PyKatanaFlags, Katana::Flags) - DirectStrMethod (PyKatanaFlags_Str, PyKatanaFlags, Katana::Flags) - DirectCmpMethod (PyKatanaFlags_Cmp, IsPyKatanaFlags, PyKatanaFlags) - DirectHashMethod(PyKatanaFlags_Hash, PyKatanaFlags) + DirectReprMethod (PyKatanaFlags_Repr, PyKatanaFlags, Katana::Flags) + DirectStrMethod (PyKatanaFlags_Str, PyKatanaFlags, Katana::Flags) + DirectCmpByValueMethod(PyKatanaFlags_Cmp, IsPyKatanaFlags, PyKatanaFlags) + DirectHashMethod (PyKatanaFlags_Hash, KatanaFlags) extern void PyKatanaFlags_LinkPyType() { cdebug_log(20,0) << "PyKatanaFlags_LinkType()" << endl; diff --git a/kite/src/PyKite.cpp b/kite/src/PyKite.cpp index 9550085a..8a5d6553 100644 --- a/kite/src/PyKite.cpp +++ b/kite/src/PyKite.cpp @@ -27,6 +27,7 @@ namespace Kite { using std::endl; using Hurricane::tab; using Isobar::__cs; + using Isobar::getPyHash; using CRL::PyTypeToolEngine; using CRL::PyTypeGraphicTool; diff --git a/kite/src/PyKiteEngine.cpp b/kite/src/PyKiteEngine.cpp index 02b01376..a837ab96 100644 --- a/kite/src/PyKiteEngine.cpp +++ b/kite/src/PyKiteEngine.cpp @@ -45,6 +45,7 @@ namespace Kite { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::PyCell; diff --git a/tutorial/src/PyTutorial.cpp b/tutorial/src/PyTutorial.cpp index f079d487..fd2bee76 100644 --- a/tutorial/src/PyTutorial.cpp +++ b/tutorial/src/PyTutorial.cpp @@ -27,6 +27,7 @@ namespace Tutorial { using std::endl; using Hurricane::tab; using Isobar::__cs; + using Isobar::getPyHash; using CRL::PyTypeToolEngine; using CRL::PyTypeGraphicTool; diff --git a/tutorial/src/PyTutorialEngine.cpp b/tutorial/src/PyTutorialEngine.cpp index 91811b0f..e49fa72c 100644 --- a/tutorial/src/PyTutorialEngine.cpp +++ b/tutorial/src/PyTutorialEngine.cpp @@ -46,6 +46,7 @@ namespace Tutorial { using Isobar::ConstructorError; using Isobar::HurricaneError; using Isobar::HurricaneWarning; + using Isobar::getPyHash; using Isobar::ParseOneArg; using Isobar::ParseTwoArg; using Isobar::PyCell;