Esempio n. 1
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
Esempio n. 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
Esempio n. 3
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)
Esempio n. 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)