Updates bootstrap.sh to latest version.
aclocal.m4
autom4te.cache
autoscan.log
+build-aux/
clients/memaslap
clients/memcapable
clients/memcat
libtest/version.h
libtest/wait
libtool
+m4/.git
m4/libtool.m4
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
+man/*.1
+man/*.3
+man/*.8
memcached/.git
memcached/.gitignore
memcached/memcached
tests/var/
tmp_chroot
unittests/unittests
-m4/.git
-man/*.1
-man/*.3
-man/*.8
+1.0.12
+* Added memcached_result_take_value().
+
1.0.11 Sun Sep 16 20:32:13 EDT 2012
* Removed custom version of memcached.
* Updated hardening rules.
$@ $ARGS
}
+parse_command_line_options() {
+
+ if ! options=$(getopt -o c --long configure -n 'bootstrap' -- "$@"); then
+ exit 1
+ fi
+
+ eval set -- "$options"
+
+ while [ $# -gt 0 ]; do
+ case $1 in
+ -c | --configure )
+ CONFIGURE_OPTION="yes" ; shift;;
+ -- )
+ shift; break;;
+ -* )
+ echo "$0: error - unrecognized option $1" 1>&2; exit 1;;
+ *)
+ break;;
+ esac
+ done
+}
+
+
+
bootstrap() {
+ parse_command_line_options $@
determine_target_platform
if [ -d .git ]; then
run $AUTORECONF $AUTORECONF_FLAGS || die "Cannot execute $AUTORECONF $AUTORECONF_FLAGS"
configure_target_platform
+
+ if [ "$CONFIGURE_OPTION" == "yes" ]; then
+ exit
+ fi
# Backwards compatibility
if [ -n "$VALGRIND" ]; then
export -n VCS_CHECKOUT
export -n PLATFORM
export -n TARGET_PLATFORM
+CONFIGURE_OPTION=no
VCS_CHECKOUT=
PLATFORM=unknown
TARGET_PLATFORM=unknown
-bootstrap
+bootstrap $@
.. c:function:: const char *memcached_result_value (memcached_result_st *ptr)
+.. c:function:: char *memcached_result_take_value (memcached_result_st *ptr)
+
.. c:function:: size_t memcached_result_length (const memcached_result_st *ptr)
.. c:function:: uint32_t memcached_result_flags (const memcached_result_st *result)
:c:func:`memcached_result_value` returns the result value associated with the
current result object.
+:c:func:`memcached_result_take_value` returns and hands over the result value
+associated with the current result object. You must call free() to release this
+value, unless you have made use of a custom allocator. Use of a custom
+allocator requires that you create your own custom free() to release it.
+
:c:func:`memcached_result_length` returns the result length associated with
the current result object.
LIBMEMCACHED_API
const char *memcached_result_value(const memcached_result_st *self);
+LIBMEMCACHED_API
+char *memcached_result_take_value(memcached_result_st *self);
+
LIBMEMCACHED_API
size_t memcached_result_length(const memcached_result_st *self);
return memcached_string_length(sptr);
}
+char *memcached_result_take_value(memcached_result_st *self)
+{
+ memcached_string_st *sptr= &self->value;
+ return memcached_string_take_value(sptr);
+}
+
uint32_t memcached_result_flags(const memcached_result_st *self)
{
return self->item_flags;
uint64_t cas_value= memcached_result_cas(results);
test_true(cas_value);
+ char* take_value= memcached_result_take_value(results);
+ test_strcmp(__func__, take_value);
+ free(take_value);
+
memcached_result_free(results);
// Bad cas value, sanity check