python: do not crash when a function returns a null formula
* wrap/python/spot_impl.i: Map null formulas to None. * wrap/python/tests/randgen.py: New file. * wrap/python/tests/Makefile.am: Add it.
This commit is contained in:
parent
24ef5a0b7f
commit
5f2d55ab2e
3 changed files with 37 additions and 0 deletions
|
|
@ -178,6 +178,13 @@ using namespace spot;
|
|||
};
|
||||
%apply char** OUTPUT { char** err };
|
||||
|
||||
%typemap(out) spot::formula {
|
||||
if (!$1)
|
||||
$result = SWIG_Py_Void();
|
||||
else
|
||||
$result = SWIG_NewPointerObj(new spot::formula($1), $descriptor(spot::formula*), SWIG_POINTER_OWN);
|
||||
}
|
||||
|
||||
%exception {
|
||||
try {
|
||||
$action
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue