예제 #1
0
파일: interface.py 프로젝트: netyum/hippyvm
def getfullinfo_charp(re, extra, flag):
    p_result = lltype.malloc(rffi.CCHARPP.TO, 1, flavor='raw')
    rc = _pcre.pcre_fullinfo(re, extra, flag, p_result)
    result = p_result[0]
    lltype.free(p_result, flavor='raw')
    if rc < 0:
        raise ExitFunctionWithError("Internal pcre_fullinfo() error %d" % rc)
    return result
예제 #2
0
def getfullinfo_charp(re, extra, flag):
    p_result = lltype.malloc(rffi.CCHARPP.TO, 1, flavor='raw')
    rc = _pcre.pcre_fullinfo(re, extra, flag, p_result)
    result = p_result[0]
    lltype.free(p_result, flavor='raw')
    if rc < 0:
        raise ExitFunctionWithError("Internal pcre_fullinfo() error %d" % rc)
    return result
예제 #3
0
파일: interface.py 프로젝트: netyum/hippyvm
def getfullinfo_int(re, extra, flag):
    p_result = lltype.malloc(rffi.INTP.TO, 1, flavor='raw')
    rc = _pcre.pcre_fullinfo(re, extra, flag, p_result)
    result = p_result[0]
    lltype.free(p_result, flavor='raw')
    if rc < 0:
        raise ExitFunctionWithError("Internal pcre_fullinfo() error %d" % rc)
    return rffi.cast(lltype.Signed, result)
예제 #4
0
def getfullinfo_int(re, extra, flag):
    p_result = lltype.malloc(rffi.INTP.TO, 1, flavor='raw')
    rc = _pcre.pcre_fullinfo(re, extra, flag, p_result)
    result = p_result[0]
    lltype.free(p_result, flavor='raw')
    if rc < 0:
        raise ExitFunctionWithError("Internal pcre_fullinfo() error %d" % rc)
    return rffi.cast(lltype.Signed, result)