pyabc: handle a few corner cases

This commit is contained in:
Baruch Sterin 2014-10-28 18:42:14 -07:00
parent 4edc023479
commit c2ccf238fd
1 changed files with 8 additions and 2 deletions

View File

@ -744,15 +744,21 @@ void _set_death_signal();
class _Cex(object):
def __new__(cls, pCex):
if not pCex:
return None
return None
if int(pCex)==1:
return True
return object.__new__(cls)
def __init__(self, pCex):
self.pCex = pCex
def __del__(self):
_cex_free(self.pCex)
if _cex_free:
_cex_free(self.pCex)
def n_regs(self):
return _cex_n_regs(self.pCex)