PageRenderTime 16ms CodeModel.GetById 15ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/rel-1-3-29/SWIG/Examples/test-suite/python/li_cmalloc_runme.py

#
Python | 14 lines | 11 code | 3 blank | 0 comment | 1 complexity | 6b3b32a47b72d7ce96b0320b336a22d1 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1from li_cmalloc import *
 2
 3p = malloc_int()
 4free_int(p)
 5
 6ok = 0
 7try:
 8    p = calloc_int(-1)
 9    free_int(p)
10except:
11    ok = 1
12
13if ok != 1:
14    raise RuntimeError