コード例 #1
0
ファイル: RegExp.cpp プロジェクト: CapturaCamera/hxcpp
   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);
   }
コード例 #2
0
ファイル: RegExp.cpp プロジェクト: HaxeFoundation/hxcpp
   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);
   }
コード例 #3
0
ファイル: RegExp.cpp プロジェクト: HaxeFoundation/hxcpp
   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);
   }