*
*/
+#pragma once
#ifndef __LIBMEMCACHED_STRING_H__
#define __LIBMEMCACHED_STRING_H__
size_t current_size;
const memcached_st *root;
struct {
- bool is_allocated MEMCACHED_BITFIELD;
- bool is_initialized MEMCACHED_BITFIELD;
+ bool is_allocated:1;
+ bool is_initialized:1;
} options;
};
+struct memcached_string_t {
+ size_t size;
+ const char *c_str;
+};
+
#ifdef __cplusplus
extern "C" {
#endif
#endif
+#ifdef __cplusplus
+#define memcached_string_with_size(X) (X), (static_cast<size_t>((sizeof(X) - 1)))
+#else
+#define memcached_string_with_size(X) (X), ((size_t)((sizeof(X) - 1)))
+#endif
+
#endif /* __LIBMEMCACHED_STRING_H__ */