diff options
Diffstat (limited to 'src/python/pyabc.i')
-rw-r--r-- | src/python/pyabc.i | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/python/pyabc.i b/src/python/pyabc.i index 907dec84..e071a74a 100644 --- a/src/python/pyabc.i +++ b/src/python/pyabc.i @@ -320,6 +320,20 @@ PyObject* eq_classes() return eq_classes; } +void _pyabc_array_clear() +{ + Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame(); + Vec_Int_t *vObjIds = Abc_FrameReadObjIds(pAbc); + Vec_IntClear( vObjIds ); +} + +void _pyabc_array_push(int i) +{ + Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame(); + Vec_Int_t *vObjIds = Abc_FrameReadObjIds(pAbc); + Vec_IntPush( vObjIds, i ); +} + static PyObject* pyabc_internal_python_command_callback = 0; void pyabc_internal_set_command_callback( PyObject* callback ) @@ -644,6 +658,9 @@ int _cex_get_frame(Abc_Cex_t* pCex); PyObject* eq_classes(); +void _pyabc_array_clear(); +void _pyabc_array_push(int i); + void pyabc_internal_set_command_callback( PyObject* callback ); void pyabc_internal_register_command( char * sGroup, char * sName, int fChanges ); @@ -1168,4 +1185,9 @@ def cmd_python(cmd_args): add_abc_command(cmd_python, "Python", "python", 0) +def create_abc_array(List): + _pyabc_array_clear() + for ObjId in List: + _pyabc_array_push(ObjId) + %} |