Ignore:
Timestamp:
Jul 3, 2009, 5:19:08 PM (15 years ago)
Author:
hmueller
Message:

Clibbac now uses Python memory management

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vanHelsing/trunk/clib/clibbac.cxx

    r772 r773  
    1616    retlen = strlen(binstr) * 2 + 2;
    1717
    18 // TODO replace malloc by python mem handler
    19     retbuf = (char *) malloc(retlen);
     18    retbuf = (char *) PyMem_Malloc(retlen);
    2019    if (retbuf == NULL)
    2120        return NULL;
     
    2524
    2625    result = Py_BuildValue("s", retbuf);
    27     free(retbuf);
     26    PyMem_Free(retbuf);
    2827
    2928    return result;
Note: See TracChangeset for help on using the changeset viewer.