diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2012-05-07 18:20:45 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2012-05-07 18:20:45 +0900 |
commit | 58f7b0680b2d7b99162c0cbe6420fb52eff3165c (patch) | |
tree | 643e459e3b27474f90e8cd9af35f0aa74ee0e57e /ext | |
parent | 5b309f6a47b418a256b12783cf49180006c176a3 (diff) | |
download | json-58f7b0680b2d7b99162c0cbe6420fb52eff3165c.tar.gz |
comment-out unused functions
Diffstat (limited to 'ext')
-rw-r--r-- | ext/json/ext/fbuffer/fbuffer.h | 8 | ||||
-rw-r--r-- | ext/json/ext/generator/extconf.rb | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ext/json/ext/fbuffer/fbuffer.h b/ext/json/ext/fbuffer/fbuffer.h index 7d1dad7..f7c2b03 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 32aed7f..c947501 100644 --- a/ext/json/ext/generator/extconf.rb +++ b/ext/json/ext/generator/extconf.rb @@ -10,4 +10,5 @@ if CONFIG['CC'] =~ /gcc/ end end +$defs << "-DJSON_GENERATOR" create_makefile 'json/ext/generator' |