]> granicus.if.org Git - onig/commitdiff
add onig_set_callout_user_data_of_match_param()
authorK.Kosako <kosako@sofnec.co.jp>
Wed, 4 Apr 2018 07:23:27 +0000 (16:23 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Wed, 4 Apr 2018 07:23:27 +0000 (16:23 +0900)
src/oniguruma.h
src/regexec.c

index 2128783c77421db79083fb3715121ae699c5b1cc..8ef3d784da7831258f7e21e8869fe3acc4c11a08 100644 (file)
@@ -894,6 +894,8 @@ ONIG_EXTERN
 int onig_set_progress_callout_of_match_param P_((OnigMatchParam* param, OnigCalloutFunc f));
 ONIG_EXTERN
 int onig_set_retraction_callout_of_match_param P_((OnigMatchParam* param, OnigCalloutFunc f));
+ONIG_EXTERN
+int onig_set_callout_user_data_of_match_param P_((OnigMatchParam* param, void* user_data));
 
 /* for callout functions */
 ONIG_EXTERN
index d73e7423c4db4bc604786c5593083856c95ea0d8..d16c47b04ffe7832100c9590a18c3680e257202d 100644 (file)
@@ -100,6 +100,17 @@ onig_set_retraction_callout_of_match_param(OnigMatchParam* param, OnigCalloutFun
 #endif
 }
 
+extern int
+onig_set_callout_user_data_of_match_param(OnigMatchParam* param, void* user_data)
+{
+#ifdef USE_CALLOUT
+  param->callout_user_data = user_data;
+  return ONIG_NORMAL;
+#else
+  return ONIG_NO_SUPPORT_CONFIG;
+#endif
+}
+
 
 
 typedef struct {