/tags/rel-1-3-29/SWIG/Examples/test-suite/python/li_cmalloc_runme.py
Python | 14 lines | 11 code | 3 blank | 0 comment | 2 complexity | 6b3b32a47b72d7ce96b0320b336a22d1 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- from li_cmalloc import *
- p = malloc_int()
- free_int(p)
- ok = 0
- try:
- p = calloc_int(-1)
- free_int(p)
- except:
- ok = 1
- if ok != 1:
- raise RuntimeError