Fix small name usage

This commit is contained in:
Patrick Pelissier committed 2025-03-01 12:19:35 +01:00
1 parent 6d621703eb
commit 36d11bc2bd
8 files changed
+18 -18

No files matched your search

+5 -5
View File
@@ -178,11 +178,11 @@
* Created Function objects are part of the public interface */ * Created Function objects are part of the public interface */
#define M_ALG0_DEF_FUNCOBJ(name, container_t, cont_oplist, type_t, type_oplist, it_t) \ #define M_ALG0_DEF_FUNCOBJ(name, container_t, cont_oplist, type_t, type_oplist, it_t) \
\ \
FUNC_OBJ_ITF_DEF(M_F(name, _test_obj), bool, type_t const) \ M_FUNC_OBJ_ITF_DEF(M_F(name, _test_obj), bool, type_t const) \
FUNC_OBJ_ITF_DEF(M_F(name, _eq_obj), bool, type_t const, type_t const ) \ M_FUNC_OBJ_ITF_DEF(M_F(name, _eq_obj), bool, type_t const, type_t const ) \
FUNC_OBJ_ITF_DEF(M_F(name, _cmp_obj), int, type_t const, type_t const ) \ M_FUNC_OBJ_ITF_DEF(M_F(name, _cmp_obj), int, type_t const, type_t const ) \
FUNC_OBJ_ITF_DEF(M_F(name, _transform_obj), void, type_t *, type_t const ) \ M_FUNC_OBJ_ITF_DEF(M_F(name, _transform_obj), void, type_t *, type_t const )\
FUNC_OBJ_ITF_DEF(M_F(name, _apply_obj), void, type_t * ) \ M_FUNC_OBJ_ITF_DEF(M_F(name, _apply_obj), void, type_t * ) \
/* Define the sort functions with the CMP operator using the order selected */ /* Define the sort functions with the CMP operator using the order selected */
+2 -2
View File
@@ -115,7 +115,7 @@
#define M_D3QU3_DEF_TYPE(name, type, oplist, deque_t, it_t, node_t) \ #define M_D3QU3_DEF_TYPE(name, type, oplist, deque_t, it_t, node_t) \
\ \
typedef struct M_F(name, _node_s) { \ typedef struct M_F(name, _node_s) { \
ILIST_INTERFACE(M_F(name, _node_list), struct M_F(name, _node_s)); \ M_ILIST_INTERFACE(M_F(name, _node_list), struct M_F(name, _node_s)); \
size_t size; \ size_t size; \
type data[M_MIN_FLEX_ARRAY_SIZE]; \ type data[M_MIN_FLEX_ARRAY_SIZE]; \
} node_t; \ } node_t; \
@@ -127,7 +127,7 @@
The interfaces are compatible. \ The interfaces are compatible. \
*/ \ */ \
/* FIXME: How can I separate public types and private implementation? */ \ /* FIXME: How can I separate public types and private implementation? */ \
ILIST_DEF(M_F(name, _node_list), node_t, (DEL(M_GET_FREE oplist)) ) \ M_ILIST_DEF(M_F(name, _node_list), node_t, (DEL(M_GET_FREE oplist)) ) \
\ \
/* Define an internal iterator */ \ /* Define an internal iterator */ \
typedef struct M_F(name, _it2_s) { \ typedef struct M_F(name, _it2_s) { \
+2 -2
View File
@@ -131,7 +131,7 @@
*/ */
#define M_PR1OQUEUE_DEF_P3(name, type, oplist, prioqueue_t, it_t) \ #define M_PR1OQUEUE_DEF_P3(name, type, oplist, prioqueue_t, it_t) \
/* Definition of the internal array used to construct the priority queue */ \ /* Definition of the internal array used to construct the priority queue */ \
ARRAY_DEF(M_F(name, _array), type, oplist) \ M_ARRAY_DEF(M_F(name, _array), type, oplist) \
M_PR1OQUEUE_DEF_TYPE(name, type, oplist, prioqueue_t, it_t) \ M_PR1OQUEUE_DEF_TYPE(name, type, oplist, prioqueue_t, it_t) \
M_CHECK_COMPATIBLE_OPLIST(name, 1, type, oplist) \ M_CHECK_COMPATIBLE_OPLIST(name, 1, type, oplist) \
M_PR1OQUEUE_DEF_CORE(name, type, oplist, prioqueue_t, it_t) \ M_PR1OQUEUE_DEF_CORE(name, type, oplist, prioqueue_t, it_t) \
@@ -476,7 +476,7 @@
\ \
M_IF_METHOD(GET_STR, oplist)( \ M_IF_METHOD(GET_STR, oplist)( \
M_INLINE void \ M_INLINE void \
M_F(name, _get_str)(string_t str, const prioqueue_t p, bool append) \ M_F(name, _get_str)(m_string_t str, const prioqueue_t p, bool append) \
{ \ { \
M_F(name, _array_get_str)(str, p->array, append); \ M_F(name, _array_get_str)(str, p->array, append); \
} \ } \
+1 -1
View File
@@ -400,7 +400,7 @@ m_ser1al_bin_read_float(m_serial_read_t serial, long double *r, const size_t siz
Set 's' with the string if succeeds Set 's' with the string if succeeds
Return M_SERIAL_OK_DONE if it succeeds, M_SERIAL_FAIL otherwise */ Return M_SERIAL_OK_DONE if it succeeds, M_SERIAL_FAIL otherwise */
M_INLINE m_serial_return_code_t M_INLINE m_serial_return_code_t
m_ser1al_bin_read_string(m_serial_read_t serial, struct string_s *s){ m_ser1al_bin_read_string(m_serial_read_t serial, struct m_string_s *s){
FILE *f = (FILE*) serial->data[0].p; FILE *f = (FILE*) serial->data[0].p;
M_ASSERT(f != NULL && s != NULL); M_ASSERT(f != NULL && s != NULL);
// First read the number of non null characters // First read the number of non null characters
+5 -5
View File
@@ -1284,7 +1284,7 @@ M_IF_METHOD2(IT_LAST, IT_CREF, oplist)( \
#define M_SHAR3D_PTR_DECL_IO(name, shared_t, oplist) \ #define M_SHAR3D_PTR_DECL_IO(name, shared_t, oplist) \
M_IF_METHOD(OUT_STR, oplist)( extern void M_F(name, _out_str)(FILE *, const shared_t *); , ) \ M_IF_METHOD(OUT_STR, oplist)( extern void M_F(name, _out_str)(FILE *, const shared_t *); , ) \
M_IF_METHOD(IN_STR, oplist)( extern bool M_F(name, _in_str)(shared_t *, FILE *); , ) \ M_IF_METHOD(IN_STR, oplist)( extern bool M_F(name, _in_str)(shared_t *, FILE *); , ) \
M_IF_METHOD(GET_STR, oplist)( extern void M_F(name, _get_str)(string_t, const shared_t *, bool); , ) \ M_IF_METHOD(GET_STR, oplist)( extern void M_F(name, _get_str)(m_string_t, const shared_t *, bool); , ) \
M_IF_METHOD(PARSE_STR, oplist)( extern bool M_F(name, _parse_str)(shared_t *, const char *, const char **); , ) \ M_IF_METHOD(PARSE_STR, oplist)( extern bool M_F(name, _parse_str)(shared_t *, const char *, const char **); , ) \
M_IF_METHOD(OUT_SERIAL, oplist)( extern m_serial_return_code_t M_F(name, _out_serial)(m_serial_write_t, const shared_t *); , ) \ M_IF_METHOD(OUT_SERIAL, oplist)( extern m_serial_return_code_t M_F(name, _out_serial)(m_serial_write_t, const shared_t *); , ) \
M_IF_METHOD(IN_SERIAL, oplist)( extern m_serial_return_code_t M_F(name, _in_serial)(shared_t *, m_serial_read_t); , ) \ M_IF_METHOD(IN_SERIAL, oplist)( extern m_serial_return_code_t M_F(name, _in_serial)(shared_t *, m_serial_read_t); , ) \
@@ -1305,7 +1305,7 @@ M_IF_METHOD(IN_STR, oplist)( \
{ \ { \
M_ASSERT (out != NULL && file != NULL); \ M_ASSERT (out != NULL && file != NULL); \
M_F(name, _write_lock)(out); \ M_F(name, _write_lock)(out); \
bool r m_volatile = false; \ m_volatile bool r = false; \
M_ON_EXCEPTION( M_F(name, _write_unlock)(out) ) \ M_ON_EXCEPTION( M_F(name, _write_unlock)(out) ) \
r = M_CALL_IN_STR(oplist, out->data, file); \ r = M_CALL_IN_STR(oplist, out->data, file); \
/* even if r is false, we signal the data (no functional impact)*/ \ /* even if r is false, we signal the data (no functional impact)*/ \
@@ -1315,7 +1315,7 @@ M_IF_METHOD(IN_STR, oplist)( \
} \ } \
, ) \ , ) \
M_IF_METHOD(GET_STR, oplist)( \ M_IF_METHOD(GET_STR, oplist)( \
fattr void M_F(name, _get_str)(string_t str, const shared_t *out, bool append) \ fattr void M_F(name, _get_str)(m_string_t str, const shared_t *out, bool append) \
{ \ { \
M_ASSERT (out != NULL); \ M_ASSERT (out != NULL); \
M_F(name, _read_lock)(out); \ M_F(name, _read_lock)(out); \
@@ -1329,7 +1329,7 @@ M_IF_METHOD(PARSE_STR, oplist)( \
{ \ { \
M_ASSERT (out != NULL); \ M_ASSERT (out != NULL); \
M_F(name, _write_lock)(out); \ M_F(name, _write_lock)(out); \
bool m_volatile r = false; \ m_volatile bool r = false; \
M_ON_EXCEPTION( M_F(name, _write_unlock)(out) ) \ M_ON_EXCEPTION( M_F(name, _write_unlock)(out) ) \
r = M_CALL_PARSE_STR(oplist, out->data, str, endp); \ r = M_CALL_PARSE_STR(oplist, out->data, str, endp); \
/* even if r is false, we signal the data (no functional impact)*/ \ /* even if r is false, we signal the data (no functional impact)*/ \
@@ -1354,7 +1354,7 @@ M_IF_METHOD(IN_SERIAL, oplist)( \
{ \ { \
M_ASSERT (out != NULL); \ M_ASSERT (out != NULL); \
M_F(name, _write_lock)(out); \ M_F(name, _write_lock)(out); \
m_serial_return_code_t m_volatile r = M_SERIAL_FAIL; \ m_volatile m_serial_return_code_t r = M_SERIAL_FAIL; \
M_ON_EXCEPTION( M_F(name, _write_unlock)(out) ) \ M_ON_EXCEPTION( M_F(name, _write_unlock)(out) ) \
r = M_CALL_IN_SERIAL(oplist, out->data, serial); \ r = M_CALL_IN_SERIAL(oplist, out->data, serial); \
/* even if r is false, we signal the data (no functional impact)*/ \ /* even if r is false, we signal the data (no functional impact)*/ \
+1 -1
View File
@@ -774,7 +774,7 @@ m_snapsh0t_mrsw_read_end(m_snapsh0t_mrsw_ct s, unsigned int idx)
{ \ { \
M_SNAPSH0T_SPMC_CONTRACT(snap->core); \ M_SNAPSH0T_SPMC_CONTRACT(snap->core); \
const M_F(name, _mrsw_aligned_type_ct) *oldx; \ const M_F(name, _mrsw_aligned_type_ct) *oldx; \
oldx = M_CTYPE_FROM_FIELD(M_F(name, _mrsw_aligned_type_ct), old, type, x); \ oldx = (const M_F(name, _mrsw_aligned_type_ct) *) old; \
M_ASSERT (oldx >= snap->core->data); \ M_ASSERT (oldx >= snap->core->data); \
M_ASSERT (oldx < snap->core->data + snap->core->core->n_reader + M_SNAPSH0T_SPMC_EXTRA_BUFFER); \ M_ASSERT (oldx < snap->core->data + snap->core->core->n_reader + M_SNAPSH0T_SPMC_EXTRA_BUFFER); \
M_ASSERT(snap->core->core->n_reader + M_SNAPSH0T_SPMC_EXTRA_BUFFER < UINT_MAX); \ M_ASSERT(snap->core->core->n_reader + M_SNAPSH0T_SPMC_EXTRA_BUFFER < UINT_MAX); \
+1 -1
View File
@@ -1300,7 +1300,7 @@ typedef int32_t m_tr33_index_t;
#define M_TR33_DEF_P4_IO(name, type, oplist, tree_t, it_t) \ #define M_TR33_DEF_P4_IO(name, type, oplist, tree_t, it_t) \
M_IF_METHOD(GET_STR, oplist)( \ M_IF_METHOD(GET_STR, oplist)( \
M_INLINE void \ M_INLINE void \
M_F(name, _get_str)(string_t str, /*const*/ tree_t tree, bool append) { \ M_F(name, _get_str)(m_string_t str, /*const*/ tree_t tree, bool append) { \
(append ? m_string_cat_cstr : m_string_set_cstr) (str, "["); \ (append ? m_string_cat_cstr : m_string_set_cstr) (str, "["); \
it_t it = M_F(name, _it)(tree); \ it_t it = M_F(name, _it)(tree); \
while (!M_F(name, _end_p)(it)) { \ while (!M_F(name, _end_p)(it)) { \
+1 -1
View File
@@ -143,7 +143,7 @@ typedef struct m_work3r_thread_s {
/* Definition of the queue that will record the work orders */ /* Definition of the queue that will record the work orders */
M_BUFFER_DEF(m_work3r_queue, m_work3r_order_ct, 0, M_BUFFER_DEF(m_work3r_queue, m_work3r_order_ct, 0,
BUFFER_QUEUE|BUFFER_UNBLOCKING_PUSH|BUFFER_BLOCKING_POP|BUFFER_THREAD_SAFE|BUFFER_DEFERRED_POP, M_WORK3R_OPLIST) M_BUFFER_QUEUE|M_BUFFER_UNBLOCKING_PUSH|M_BUFFER_BLOCKING_POP|M_BUFFER_THREAD_SAFE|M_BUFFER_DEFERRED_POP, M_WORK3R_OPLIST)
/* Definition the global pool of workers */ /* Definition the global pool of workers */
typedef struct m_worker_s { typedef struct m_worker_s {