From: K.Kosako Date: Thu, 11 Jan 2018 07:04:31 +0000 (+0900) Subject: refactoring X-Git-Tag: v6.7.1^2~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d414090e19881a3b554f437d88d012a755eabd3;p=onig refactoring --- diff --git a/src/regcomp.c b/src/regcomp.c index a2a39c2..25528cc 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -2,7 +2,7 @@ regcomp.c - Oniguruma (regular expression library) **********************************************************************/ /*- - * Copyright (c) 2002-2017 K.Kosako + * Copyright (c) 2002-2018 K.Kosako * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -6190,13 +6190,18 @@ onig_initialize(OnigEncoding encodings[], int n) return 0; } -static OnigEndCallListItemType* EndCallTop; +typedef struct EndCallListItem { + struct EndCallListItem* next; + void (*func)(void); +} EndCallListItemType; + +static EndCallListItemType* EndCallTop; extern void onig_add_end_call(void (*func)(void)) { - OnigEndCallListItemType* item; + EndCallListItemType* item; - item = (OnigEndCallListItemType* )xmalloc(sizeof(*item)); + item = (EndCallListItemType* )xmalloc(sizeof(*item)); if (item == 0) return ; item->next = EndCallTop; @@ -6208,7 +6213,7 @@ extern void onig_add_end_call(void (*func)(void)) static void exec_end_call_list(void) { - OnigEndCallListItemType* prev; + EndCallListItemType* prev; void (*func)(void); while (EndCallTop != 0) { diff --git a/src/regint.h b/src/regint.h index c0422d2..60287c2 100644 --- a/src/regint.h +++ b/src/regint.h @@ -757,11 +757,6 @@ typedef struct { } MatchArg; -typedef struct OnigEndCallListItem { - struct OnigEndCallListItem* next; - void (*func)(void); -} OnigEndCallListItemType; - extern void onig_add_end_call(void (*func)(void));