35 memcpy (s->
s, data, size);
49 var[ofs].
length = strlen(
string);
50 var[ofs].
s = (
const uint8_t *)
string;
size_t length
length of string
Coap string data definition.
Coap string data definition with const data.
coap_string_t * coap_new_string(size_t size)
Returns a new string object with at least size+1 bytes storage allocated.
coap_str_const_t * coap_make_str_const(const char *string)
Take the specified string and create a coap_str_const_t *.
void coap_delete_string(coap_string_t *s)
Deletes the given string and releases any memory allocated.
void coap_delete_str_const(coap_str_const_t *s)
Deletes the given const string and releases any memory allocated.
struct coap_string_t coap_string_t
Coap string data definition.
size_t length
length of string
const uint8_t * s
string data
void * coap_malloc_type(coap_memory_tag_t type, size_t size)
Allocates a chunk of size bytes and returns a pointer to the newly allocated memory.
#define coap_log(level,...)
Logging function.
coap_str_const_t * coap_new_str_const(const uint8_t *data, size_t size)
Returns a new const string object with at least size+1 bytes storage allocated, and the provided data...
void coap_free_type(coap_memory_tag_t type, void *p)
Releases the memory that was allocated by coap_malloc_type().
#define COAP_MAX_STR_CONST_FUNC
Pulls together all the internal only header files.