In case of multiple addType with same type :
does not throw Error anymore but cerr and return this way it is possible to execute python script more than one time Adding trace information for DirectDeleteMethod
This commit is contained in:
parent
98df102f5d
commit
689b8cd722
|
@ -206,8 +206,11 @@ using namespace Hurricane;
|
||||||
, bool isPythonType
|
, bool isPythonType
|
||||||
, const char* idBase ) {
|
, const char* idBase ) {
|
||||||
for ( unsigned i=0 ; i < _types.size() ; i++ ) {
|
for ( unsigned i=0 ; i < _types.size() ; i++ ) {
|
||||||
if ( ! strcmp ( _types[i]->_id, id ) )
|
if ( ! strcmp ( _types[i]->_id, id ) ) {
|
||||||
throw Error ( objectTypeRedefinition );
|
//throw Error ( objectTypeRedefinition ); // 04.09.2009 d2 modification
|
||||||
|
cerr << objectTypeRedefinition << endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assert ( strlen ( id ) < 11 );
|
assert ( strlen ( id ) < 11 );
|
||||||
|
|
|
@ -321,7 +321,11 @@ extern "C" {
|
||||||
trace << #PY_SELF_TYPE"_DeAlloc(" << hex << self << ") " \
|
trace << #PY_SELF_TYPE"_DeAlloc(" << hex << self << ") " \
|
||||||
<< self->ACCESS_OBJECT << endl; \
|
<< self->ACCESS_OBJECT << endl; \
|
||||||
\
|
\
|
||||||
if ( self->ACCESS_OBJECT ) delete self->ACCESS_OBJECT; \
|
if ( self->ACCESS_OBJECT ) { \
|
||||||
|
trace << "C++ object := " << hex \
|
||||||
|
<< &(self->ACCESS_OBJECT) << endl; \
|
||||||
|
delete self->ACCESS_OBJECT; \
|
||||||
|
} \
|
||||||
PyObject_DEL ( self ); \
|
PyObject_DEL ( self ); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue