basho-labs / riak-c-client

Riak C Client
Apache License 2.0
20 stars 8 forks source link

Clean Up riak_object #43

Closed hazen closed 10 years ago

hazen commented 10 years ago

This key bit of infrastructure was lacking:

bookshelfdave commented 10 years ago

@javajolt can't automatically merge, can you please rebase?

hazen commented 10 years ago

I merged in the build-cleanup stuff. Sorry these changes were on top of that so it'll have both changes until #42 is merged.

bookshelfdave commented 10 years ago

Functions that have the form:

link->has_foo = RIAK_TRUE;
link->foo = riak_binary_copy(cfg, value);
if (link->foo == NULL) {
    return ERIAK_OUT_OF_MEMORY;
}
return ERIAK_OK;

should set the has_foo value AFTER the memory check, otherwise has_foo will be set when ERIAK_OUT_OF_MEMORY is returned.

bookshelfdave commented 10 years ago

:+1: