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
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)