semver: 1.0 -> 1
[m6w6/libmemcached] / include / libmemcached-1 / struct / string.h
1 /*
2 +--------------------------------------------------------------------+
3 | libmemcached - C/C++ Client Library for memcached |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted under the terms of the BSD license. |
7 | You should have received a copy of the license in a bundled file |
8 | named LICENSE; in case you did not receive a copy you can review |
9 | the terms online at: https://opensource.org/licenses/BSD-3-Clause |
10 +--------------------------------------------------------------------+
11 | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
12 | Copyright (c) 2020 Michael Wallner <mike@php.net> |
13 +--------------------------------------------------------------------+
14 */
15
16 #pragma once
17
18 /**
19 Strings are always under our control so we make some assumptions
20 about them.
21
22 1) is_initialized is always valid.
23 2) A string once intialized will always be, until free where we
24 unset this flag.
25 3) A string always has a root.
26 */
27
28 struct memcached_string_st {
29 char *end;
30 char *string;
31 size_t current_size;
32 struct memcached_st *root;
33 struct {
34 bool is_allocated : 1;
35 bool is_initialized : 1;
36 } options;
37 };