(Temporary?) fix to get the Windows buildbot going again: remove constness from a couple of variables.
svn path=/trunk/; revision=25935
This commit is contained in:
parent
45b2e37a27
commit
c1736aec4e
|
@ -345,7 +345,7 @@ static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out
|
|||
*/
|
||||
#define UAT_LSTRING_CB_DEF(basename,field_name,rec_t,ptr_element,len_element) \
|
||||
static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, unsigned len, void* u1 _U_, void* u2 _U_) {\
|
||||
const char* new_val = uat_unesc(buf,len,&(((rec_t*)rec)->len_element)); \
|
||||
char* new_val = uat_unesc(buf,len,&(((rec_t*)rec)->len_element)); \
|
||||
if ((((rec_t*)rec)->ptr_element)) g_free((((rec_t*)rec)->ptr_element)); \
|
||||
(((rec_t*)rec)->ptr_element) = new_val; }\
|
||||
static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out_ptr, unsigned* out_len, void* u1 _U_, void* u2 _U_) {\
|
||||
|
@ -367,7 +367,7 @@ static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out
|
|||
*/
|
||||
#define UAT_BUFFER_CB_DEF(basename,field_name,rec_t,ptr_element,len_element) \
|
||||
static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, unsigned len, void* u1 _U_, void* u2 _U_) {\
|
||||
const char* new_buf = len ? g_memdup(buf,len) : NULL; \
|
||||
char* new_buf = len ? g_memdup(buf,len) : NULL; \
|
||||
if ((((rec_t*)rec)->ptr_element) ) g_free((((rec_t*)rec)->ptr_element)); \
|
||||
(((rec_t*)rec)->ptr_element) = new_buf; \
|
||||
(((rec_t*)rec)->len_element) = len; } \
|
||||
|
|
Loading…
Reference in New Issue