Skip to content

Commit

Permalink
Reapply plerohellec's fix and re-SWIG.
Browse files Browse the repository at this point in the history
  • Loading branch information
evan committed Jun 24, 2013
1 parent d37ba96 commit 063480e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ext/rlibmemcached.i
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ VALUE memcached_fetch_rvalue(memcached_st *ptr, char *key, size_t *key_length, u
VALUE memcached_fetch_rvalue(memcached_st *ptr, char *key, size_t *key_length, uint32_t *flags, memcached_return *error) {
size_t value_length = 0;
VALUE ary = rb_ary_new();
*key_length = 0;
if (error) *error = MEMCACHED_TIMEOUT; // timeouts leave error uninitialized
char *value = memcached_fetch(ptr, key, key_length, &value_length, flags, error);
VALUE str = rb_str_new_by_ref(value, value_length);
Expand Down
1 change: 1 addition & 0 deletions ext/rlibmemcached_wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2301,6 +2301,7 @@ VALUE memcached_get_from_last_rvalue(memcached_st *ptr, const char *key, size_t
VALUE memcached_fetch_rvalue(memcached_st *ptr, char *key, size_t *key_length, uint32_t *flags, memcached_return *error) {
size_t value_length = 0;
VALUE ary = rb_ary_new();
*key_length = 0;
if (error) *error = MEMCACHED_TIMEOUT; // timeouts leave error uninitialized
char *value = memcached_fetch(ptr, key, key_length, &value_length, flags, error);
VALUE str = rb_str_new_by_ref(value, value_length);
Expand Down

0 comments on commit 063480e

Please sign in to comment.