Skip to content

Commit

Permalink
bindings: fixed warning on unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
rhash committed Jul 2, 2014
1 parent 34366c3 commit eb61f47
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bindings/ruby/rhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,23 @@ static VALUE rh_update(VALUE self, VALUE msg) {
Data_Get_Struct(self, struct rhash_context, ctx);

if (TYPE(msg) != T_STRING) {
msg = rb_obj_as_string(msg); // convert to string
msg = rb_obj_as_string(msg); /* convert to string */
}

rhash_update(ctx, RSTRING_PTR(msg), RSTRING_LEN(msg));
return self;
}

/* declaring non-static method to fix a warning on an unused function */
VALUE rh_update_file(VALUE self, VALUE file);

/**
* call-seq:
* rhash.update_file(filename) -> RHash
*
* Updates this <code>RHash</code> with data from given file.
*/
static VALUE rh_update_file(VALUE self, VALUE file) {
VALUE rh_update_file(VALUE self, VALUE file) {
// this function is actually implemented in pure Ruby below
// this allows us to handle files in platform-independent way
return self;
Expand Down

0 comments on commit eb61f47

Please sign in to comment.