ONIG_CALLOUT_ABORT = ONIG_ABORT /* == -3 */
};
+struct OnigMatchParamStruct;
+typedef struct OnigMatchParamStruct OnigMatchParam;
-typedef struct {
- unsigned int match_stack_limit;
- unsigned long retry_limit_in_match;
- OnigCalloutFunc callout_of_code;
- OnigCalloutFunc retraction_callout_of_code;
- void* callout_user_data;
-} OnigMatchParams;
/* Oniguruma Native API */
ONIG_EXTERN
int onig_search P_((OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option));
ONIG_EXTERN
-int onig_search_with_params P_((OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option, OnigMatchParams* mp));
+int onig_search_with_params P_((OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option, OnigMatchParam* mp));
ONIG_EXTERN
int onig_match P_((OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* at, OnigRegion* region, OnigOptionType option));
ONIG_EXTERN
-int onig_match_with_params P_((OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* at, OnigRegion* region, OnigOptionType option, OnigMatchParams* mp));
+int onig_match_with_params P_((OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* at, OnigRegion* region, OnigOptionType option, OnigMatchParam* mp));
ONIG_EXTERN
-void onig_initialize_match_params P_((OnigMatchParams* mp));
+void onig_initialize_match_params P_((OnigMatchParam* mp));
ONIG_EXTERN
OnigRegion* onig_region_new P_((void));
#define CHECK_INTERRUPT_IN_MATCH
+struct OnigMatchParamStruct {
+ unsigned int match_stack_limit;
+ unsigned long retry_limit_in_match;
+ OnigCalloutFunc callout_of_code;
+ OnigCalloutFunc retraction_callout_of_code;
+ void* callout_user_data;
+};
+
typedef struct {
void* stack_p;
int stack_n;
const UChar* start; /* search start position (for \G: BEGIN_POSITION) */
unsigned int match_stack_limit;
unsigned long retry_limit_in_match;
- OnigMatchParams* mp;
+ OnigMatchParam* mp;
#ifdef USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE
int best_len; /* for ONIG_OPTION_FIND_LONGEST */
UChar* best_s;
static OnigCalloutFunc DefaultRetractionCallout;
extern void
-onig_initialize_match_params(OnigMatchParams* mp)
+onig_initialize_match_params(OnigMatchParam* mp)
{
mp->match_stack_limit = MatchStackLimit;
#ifdef USE_RETRY_LIMIT_IN_MATCH
onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at,
OnigRegion* region, OnigOptionType option)
{
- OnigMatchParams mp;
+ OnigMatchParam mp;
onig_initialize_match_params(&mp);
return onig_match_with_params(reg, str, end, at, region, option, &mp);
extern int
onig_match_with_params(regex_t* reg, const UChar* str, const UChar* end,
const UChar* at, OnigRegion* region, OnigOptionType option,
- OnigMatchParams* mp)
+ OnigMatchParam* mp)
{
int r;
UChar *prev;
const UChar* start, const UChar* range, OnigRegion* region,
OnigOptionType option)
{
- OnigMatchParams mp;
+ OnigMatchParam mp;
onig_initialize_match_params(&mp);
return onig_search_with_params(reg, str, end, start, range, region, option, &mp);
extern int
onig_search_with_params(regex_t* reg, const UChar* str, const UChar* end,
const UChar* start, const UChar* range, OnigRegion* region,
- OnigOptionType option, OnigMatchParams* mp)
+ OnigOptionType option, OnigMatchParam* mp)
{
int r;
UChar *s, *prev;