Commit c2ccf238 by Baruch Sterin

pyabc: handle a few corner cases

parent 4edc0234
...@@ -744,15 +744,21 @@ void _set_death_signal(); ...@@ -744,15 +744,21 @@ void _set_death_signal();
class _Cex(object): class _Cex(object):
def __new__(cls, pCex): def __new__(cls, pCex):
if not pCex: if not pCex:
return None return None
if int(pCex)==1:
return True
return object.__new__(cls) return object.__new__(cls)
def __init__(self, pCex): def __init__(self, pCex):
self.pCex = pCex self.pCex = pCex
def __del__(self): def __del__(self):
_cex_free(self.pCex) if _cex_free:
_cex_free(self.pCex)
def n_regs(self): def n_regs(self):
return _cex_n_regs(self.pCex) return _cex_n_regs(self.pCex)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment