11 #ifndef MERCURY_PROC_STRING_H
12 #define MERCURY_PROC_STRING_H
22 #ifndef HG_PROC_STRING_INLINE
23 #if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
24 #define HG_PROC_STRING_INLINE extern HG_INLINE
26 #define HG_PROC_STRING_INLINE HG_INLINE
151 hg_uint64_t string_len = 0;
156 string_len = (
string->data) ? strlen(string->
data) + 1 : 0;
192 string->data = (
char*) malloc(string_len);
HG_EXPORT hg_proc_op_t hg_proc_get_op(hg_proc_t proc)
Get the operation type associated to the processor.
HG_EXPORT char * hg_string_object_swap(hg_string_object_t *string, char *s)
Exchange the content of the string structure by the content of s.
const char * hg_const_string_t
HG_EXPORT HG_PROC_INLINE hg_return_t hg_proc_raw(hg_proc_t proc, void *buf, size_t buf_size)
Generic processing routine.
#define HG_PROC_STRING_INLINE
HG_EXPORT hg_return_t hg_string_object_free(hg_string_object_t *string)
Free a string object.
HG_EXPORT hg_return_t hg_string_object_init_const_char(hg_string_object_t *string, const char *s, hg_bool_t is_owned)
Initialize a string object from the const string pointed to by s.
HG_EXPORT HG_PROC_STRING_INLINE hg_return_t hg_proc_hg_const_string_t(hg_proc_t proc, hg_const_string_t *data)
Inline prototypes (do not remove)
HG_EXPORT HG_PROC_STRING_INLINE hg_return_t hg_proc_hg_string_object_t(hg_proc_t proc, hg_string_object_t *data)
Generic processing routine.
HG_EXPORT hg_return_t hg_string_object_init_char(hg_string_object_t *string, char *s, hg_bool_t is_owned)
Initialize a string object from the string pointed to by s.
HG_EXPORT HG_PROC_STRING_INLINE hg_return_t hg_proc_hg_string_t(hg_proc_t proc, hg_string_t *data)
Generic processing routine.
HG_EXPORT HG_PROC_INLINE hg_return_t hg_proc_hg_uint8_t(hg_proc_t proc, hg_uint8_t *data)
Generic processing routine.
enum hg_return hg_return_t