Changeset 773


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

Clibbac now uses Python memory management

Location:
vanHelsing/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • vanHelsing/trunk/bconsole.py

    r772 r773  
    4444}
    4545
    46 #import clibbac
     46import clibbac
    4747
    4848class ConsoleError(IOError):
  • 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;
  • vanHelsing/trunk/setup.py

    r772 r773  
    1010                    include_dirs = ['bacula_repo/src/'],
    1111                    libraries = ['crypto', 'ssl', 'bac'],
     12                    library_dirs = ['build/lib/'],
     13                    runtime_library_dirs = ['build/lib/'],
    1214                    )
    1315
Note: See TracChangeset for help on using the changeset viewer.