summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaruch Sterin <baruchs@gmail.com>2013-01-25 12:50:11 -0800
committerBaruch Sterin <baruchs@gmail.com>2013-01-25 12:50:11 -0800
commitaaacf57304b74b37617fcd669f1c1314afebc913 (patch)
treef701342321858daffdcae78e0d54e6ed839a7a1e
parent43d54351249d57d3f3e8319a941b049dcc5466e8 (diff)
downloadabc-aaacf57304b74b37617fcd669f1c1314afebc913.tar.gz
abc-aaacf57304b74b37617fcd669f1c1314afebc913.tar.bz2
abc-aaacf57304b74b37617fcd669f1c1314afebc913.zip
pyabc: fix _cex_put to not call Abc_CexDup() twice
-rw-r--r--src/python/pyabc.i40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/python/pyabc.i b/src/python/pyabc.i
index 1cdc05ff..0e1f2c3d 100644
--- a/src/python/pyabc.i
+++ b/src/python/pyabc.i
@@ -217,32 +217,32 @@ Abc_Cex_t* _cex_get()
int _cex_get_vec_len()
{
Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame();
- Vec_Ptr_t* vCexVec = Abc_FrameReadCexVec(pAbc);
-
- if( ! vCexVec )
- {
- return 0;
- }
-
- return Vec_PtrSize(vCexVec);
+ Vec_Ptr_t* vCexVec = Abc_FrameReadCexVec(pAbc);
+
+ if( ! vCexVec )
+ {
+ return 0;
+ }
+
+ return Vec_PtrSize(vCexVec);
}
Abc_Cex_t* _cex_get_vec(int i)
{
Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame();
- Vec_Ptr_t* vCexVec = Abc_FrameReadCexVec(pAbc);
-
- if( ! vCexVec )
- {
- return NULL;
- }
+ Vec_Ptr_t* vCexVec = Abc_FrameReadCexVec(pAbc);
- Abc_Cex_t* pCex = Vec_PtrEntry( vCexVec, i );
+ if( ! vCexVec )
+ {
+ return NULL;
+ }
+
+ Abc_Cex_t* pCex = Vec_PtrEntry( vCexVec, i );
- if ( ! pCex )
- {
- return NULL;
- }
+ if ( ! pCex )
+ {
+ return NULL;
+ }
return Abc_CexDup( pCex, -1 );
}
@@ -254,7 +254,7 @@ void _cex_put(Abc_Cex_t* pCex)
pCex = Abc_CexDup(pCex, -1);
}
- Abc_FrameSetCex( Abc_CexDup(pCex, -1) );
+ Abc_FrameSetCex( pCex );
}
void _cex_free(Abc_Cex_t* pCex)