/* sysUtils */
%include "psType.h"
%include "psAbort.h"
%include "psConfigure.h"
%include "psErrorCodes.h"
%include "psError.h"
%include "psLogMsg.h"
%include "psMemory.h"
%include "psString.h"
%include "psTrace.h"

%inline %{

psErrorCode psError(psErrorCode code, psBool new, const char* msg) {
    return p_psError("UNKNOWN",0,"SWIG",code,new,msg);
}

psPtr psAlloc(size_t size) {
    return p_psAlloc(size,"UNKNOWN",0);
}

psPtr psRealloc(psPtr ptr, size_t size) {
    return p_psRealloc(ptr,size,"UNKNOWN",0);
}

void psFree(psPtr ptr) {
    p_psFree(ptr,"UNKNOWN",0);
}

psPtr psMemIncrRefCounter(psPtr vptr) {
    return p_psMemIncrRefCounter(vptr,"UNKNOWN",0);
}

psPtr psMemDecrRefCounter(psPtr vptr) {
    return p_psMemDecrRefCounter(vptr,"UNKNOWN",0);
}

void psTrace(const char* facil, psS32 myLevel, const char* msg) {
    p_psTrace(facil, myLevel, msg);
}

psS32 psMemCheckLeaksToStderr(psMemoryId id0, psMemBlock*** arr, psBool persistence) {
    return psMemCheckLeaks(id0, arr, stderr, persistence);
}
psS32 psMemCheckLeaksToStdout(psMemoryId id0, psMemBlock*** arr, psBool persistence) {
    return psMemCheckLeaks(id0, arr, stdout, persistence);
}

%}
