From 58f7b0680b2d7b99162c0cbe6420fb52eff3165c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 7 May 2012 18:20:45 +0900 Subject: [PATCH] comment-out unused functions --- ext/json/ext/fbuffer/fbuffer.h | 8 ++++++++ ext/json/ext/generator/extconf.rb | 1 + 2 files changed, 9 insertions(+) diff --git a/ext/json/ext/fbuffer/fbuffer.h b/ext/json/ext/fbuffer/fbuffer.h index 7d1dad74..f7c2b034 100644 --- a/ext/json/ext/fbuffer/fbuffer.h +++ b/ext/json/ext/fbuffer/fbuffer.h @@ -35,10 +35,14 @@ static FBuffer *fbuffer_alloc(unsigned long initial_length); static void fbuffer_free(FBuffer *fb); static void fbuffer_clear(FBuffer *fb); static void fbuffer_append(FBuffer *fb, const char *newstr, unsigned long len); +#ifdef JSON_GENERATOR static void fbuffer_append_long(FBuffer *fb, long number); +#endif static void fbuffer_append_char(FBuffer *fb, char newchr); +#ifdef JSON_GENERATOR static FBuffer *fbuffer_dup(FBuffer *fb); static VALUE fbuffer_to_s(FBuffer *fb); +#endif static FBuffer *fbuffer_alloc(unsigned long initial_length) { @@ -87,6 +91,7 @@ static void fbuffer_append(FBuffer *fb, const char *newstr, unsigned long len) } } +#ifdef JSON_GENERATOR static void fbuffer_append_str(FBuffer *fb, VALUE str) { const char *newstr = StringValuePtr(str); @@ -96,6 +101,7 @@ static void fbuffer_append_str(FBuffer *fb, VALUE str) fbuffer_append(fb, newstr, len); } +#endif static void fbuffer_append_char(FBuffer *fb, char newchr) { @@ -104,6 +110,7 @@ static void fbuffer_append_char(FBuffer *fb, char newchr) fb->len++; } +#ifdef JSON_GENERATOR static void freverse(char *start, char *end) { char c; @@ -154,3 +161,4 @@ static VALUE fbuffer_to_s(FBuffer *fb) return result; } #endif +#endif diff --git a/ext/json/ext/generator/extconf.rb b/ext/json/ext/generator/extconf.rb index 32aed7f9..c9475019 100644 --- a/ext/json/ext/generator/extconf.rb +++ b/ext/json/ext/generator/extconf.rb @@ -10,4 +10,5 @@ end end +$defs << "-DJSON_GENERATOR" create_makefile 'json/ext/generator'