Skip to content

Commit

Permalink
comment-out unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed May 7, 2012
1 parent 5b309f6 commit 58f7b06
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ext/json/ext/fbuffer/fbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
Expand All @@ -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)
{
Expand All @@ -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;
Expand Down Expand Up @@ -154,3 +161,4 @@ static VALUE fbuffer_to_s(FBuffer *fb)
return result;
}
#endif
#endif
1 change: 1 addition & 0 deletions ext/json/ext/generator/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
end
end

$defs << "-DJSON_GENERATOR"
create_makefile 'json/ext/generator'

0 comments on commit 58f7b06

Please sign in to comment.