]> granicus.if.org Git - onig/commitdiff
add by member into OnigCalloutArgs
authorK.Kosako <kosako@sofnec.co.jp>
Tue, 6 Feb 2018 06:32:19 +0000 (15:32 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Tue, 6 Feb 2018 06:32:19 +0000 (15:32 +0900)
src/oniguruma.h
src/regexec.c

index 0a3332da2615420af1b8d9fa4da8c80c411159e8..f608fbc5e02ecc25b75fbb4be74d4e55f18b4dfe 100644 (file)
@@ -750,8 +750,14 @@ enum {
   ONIG_CALLOUT_DIRECTION_RETRACTION = 1,
 };
 
+enum {
+  ONIG_CALLOUT_BY_CODE = 0,
+  ONIG_CALLOUT_BY_NAME = 1,
+};
+
 typedef struct {
   int   direction;
+  int   by;
   int   id;
   const OnigUChar* content;
   const OnigUChar* content_end;
index ca9fe081d835ff6c3db62bc165dc2260d2be845b..d78c7bb1f9c071d2e01ce97adbd433ede4a1b568 100644 (file)
@@ -799,6 +799,7 @@ onig_region_copy(OnigRegion* to, OnigRegion* from)
 
 #define CALLOUT_CODE_BODY(func, dir, sid, cstart, cend, user, args, result) do { \
   args.direction     = dir;\
+  args.by            = ONIG_CALLOUT_BY_CODE;\
   args.id            = sid;\
   args.content       = cstart;\
   args.content_end   = cend;\
@@ -922,6 +923,7 @@ typedef struct _StackType {
 /* Synchronize visible part of the type with OnigCalloutArgs */
 typedef struct {
   int   direction;
+  int   by;
   int   id;
   const OnigUChar* content;
   const OnigUChar* content_end;