Replace _clean into _reset (Fix issues for C11 build)
This commit is contained in:
1 parent
30afcb45d8
commit
e650addfe4
4 files changed
+11
-5
No files matched your search
+8
-2
@@ -91,7 +91,7 @@ M_BEGIN_PROTECTED_CODE
|
||||
INIT_SET(API_4(M_C(name, _init_set))), \
|
||||
SET(M_C(name, _set) M_IPTR), \
|
||||
CLEAR(M_C(name, _clear)), \
|
||||
CLEAN(M_C(name, _clean) M_IPTR), \
|
||||
CLEAN(M_C(name, _reset) M_IPTR), \
|
||||
NAME(name), \
|
||||
TYPE(M_C(name, _ct)), \
|
||||
OPLIST(oplist), \
|
||||
@@ -213,12 +213,18 @@ M_BEGIN_PROTECTED_CODE
|
||||
} \
|
||||
\
|
||||
static inline void \
|
||||
M_C(name, _clean)(shared_t *shared) \
|
||||
M_C(name, _reset)(shared_t *shared) \
|
||||
{ \
|
||||
M_C(name, _clear)(*shared); \
|
||||
*shared = NULL; \
|
||||
} \
|
||||
\
|
||||
static inline void M_ATTR_DEPRECATED \
|
||||
M_C(name, _clean)(shared_t *shared) \
|
||||
{ \
|
||||
M_C(name, _reset)(shared); \
|
||||
} \
|
||||
\
|
||||
static inline void \
|
||||
M_C(name, _set)(shared_t *ptr, shared_t shared) \
|
||||
{ \
|
||||
|
||||
@@ -66,7 +66,7 @@ static void test_single(void)
|
||||
|
||||
p1 = ishared1_init(NULL);
|
||||
ishared1_set(&p1, p2);
|
||||
ishared1_clean(&p2);
|
||||
ishared1_reset(&p2);
|
||||
assert(p2 == NULL);
|
||||
ishared_test(p1);
|
||||
ishared1_clear(p1);
|
||||
|
||||
@@ -235,7 +235,7 @@ static void test_out_str_fill(void)
|
||||
assert (ret == M_SERIAL_OK_DONE);
|
||||
const char *end = m_serial_str_json_read_clear(in);
|
||||
assert (*end == '\n');
|
||||
string_clean(f);
|
||||
string_reset(f);
|
||||
|
||||
m_serial_str_json_write_init(out, f);
|
||||
ret = my2_out_serial(out, el2);
|
||||
|
||||
+1
-1
@@ -62,5 +62,5 @@ void increment(dict_t d, uint64_t key)
|
||||
extern void clean(dict_t d);
|
||||
void clean(dict_t d)
|
||||
{
|
||||
dict_clean(d);
|
||||
dict_reset(d);
|
||||
}
|
||||
Reference in new issue
Block a user