]> granicus.if.org Git - onig/commitdiff
rename onig_bbuf_init() to bbuf_init()
authorK.Kosako <kkosako0@gmail.com>
Fri, 15 Feb 2019 12:56:54 +0000 (21:56 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Thu, 28 Feb 2019 05:28:18 +0000 (14:28 +0900)
src/regcomp.c
src/regint.h
src/regparse.c

index 8e3376afe746f0ce68f56fc36667b086a66c99b1..99e13d3925fa4b663a0f64b81aeee872d4bd07a8 100644 (file)
@@ -327,24 +327,6 @@ bitset_is_empty(BitSetRef bs)
   return 1;
 }
 
-extern int
-onig_bbuf_init(BBuf* buf, int size)
-{
-  if (size <= 0) {
-    size   = 0;
-    buf->p = NULL;
-  }
-  else {
-    buf->p = (UChar* )xmalloc(size);
-    if (IS_NULL(buf->p)) return(ONIGERR_MEMORY);
-  }
-
-  buf->alloc = size;
-  buf->used  = 0;
-  return 0;
-}
-
-
 #ifdef USE_CALL
 
 static int
index 7b506b67a968066affea899383d533031504ce85..c10b80acd88e2d6f9c0e584302944d172cb9e918 100644 (file)
@@ -386,7 +386,7 @@ typedef struct _BBuf {
   unsigned int alloc;
 } BBuf;
 
-#define BB_INIT(buf,size)    onig_bbuf_init((BBuf* )(buf), (size))
+#define BB_INIT(buf,size)    bbuf_init((BBuf* )(buf), (size))
 
 #define BB_SIZE_INC(buf,inc) do{\
   (buf)->alloc += (inc);\
@@ -986,7 +986,6 @@ extern int  onig_print_statistics P_((FILE* f));
 extern void   onig_warning(const char* s);
 extern UChar* onig_error_code_to_format P_((int code));
 extern void   onig_snprintf_with_pattern PV_((UChar buf[], int bufsize, OnigEncoding enc, UChar* pat, UChar* pat_end, const UChar *fmt, ...));
-extern int    onig_bbuf_init P_((BBuf* buf, int size));
 extern int    onig_compile P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo));
 extern void   onig_transfer P_((regex_t* to, regex_t* from));
 extern int    onig_is_code_in_cc_len P_((int enclen, OnigCodePoint code, void* /* CClassNode* */ cc));
index d3b8da4c29b37a1290ab909c09d455874981ac14..b2fc2bc34e4343349ddfdc5af6ad901bf0142c1b 100644 (file)
@@ -198,6 +198,23 @@ onig_set_parse_depth_limit(unsigned int depth)
   return 0;
 }
 
+static int
+bbuf_init(BBuf* buf, int size)
+{
+  if (size <= 0) {
+    size   = 0;
+    buf->p = NULL;
+  }
+  else {
+    buf->p = (UChar* )xmalloc(size);
+    if (IS_NULL(buf->p)) return(ONIGERR_MEMORY);
+  }
+
+  buf->alloc = size;
+  buf->used  = 0;
+  return 0;
+}
+
 static void
 bbuf_free(BBuf* bbuf)
 {