void create(pcre *inR) { r = inR; nmatchs = 0; pcre_fullinfo(r,NULL,PCRE_INFO_CAPTURECOUNT,&nmatchs); nmatchs++; matchs = (int*)malloc(sizeof(int) * 3 * nmatchs); _hx_set_finalizer(this, finalize); }
void create16(pcre16 *inR, String inExpr, int inFlags) { rUtf8 = 0; rUtf16 = inR; expr = inExpr; HX_OBJ_WB_GET(this, expr.raw_ref()); flags = inFlags; nmatchs = 0; pcre16_fullinfo(rUtf16,NULL,PCRE_INFO_CAPTURECOUNT,&nmatchs); nmatchs++; matchs = (int*)malloc(sizeof(int) * 3 * nmatchs); _hx_set_finalizer(this, finalize); }
void create8(pcre *inR, String inExpr, int inFlags) { rUtf8 = inR; #ifdef HX_SMART_STRINGS rUtf16 = 0; #endif expr = inExpr; HX_OBJ_WB_GET(this, expr.raw_ref()); flags = inFlags; nmatchs = 0; pcre_fullinfo(rUtf8,NULL,PCRE_INFO_CAPTURECOUNT,&nmatchs); nmatchs++; matchs = (int*)malloc(sizeof(int) * 3 * nmatchs); _hx_set_finalizer(this, finalize); }