Skip to content

Commit

Permalink
Fix small name usage
Browse files Browse the repository at this point in the history
  • Loading branch information
P-p-H-d committed Mar 1, 2025
1 parent 6d62170 commit 36d11bc
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions m-algo.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@
* 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) \
\
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 ) \
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 ) \
FUNC_OBJ_ITF_DEF(M_F(name, _apply_obj), void, type_t * ) \
M_FUNC_OBJ_ITF_DEF(M_F(name, _test_obj), bool, type_t const) \
M_FUNC_OBJ_ITF_DEF(M_F(name, _eq_obj), bool, type_t const, type_t const ) \
M_FUNC_OBJ_ITF_DEF(M_F(name, _cmp_obj), int, type_t const, type_t const ) \
M_FUNC_OBJ_ITF_DEF(M_F(name, _transform_obj), void, type_t *, type_t const )\
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 */
Expand Down
4 changes: 2 additions & 2 deletions m-deque.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
#define M_D3QU3_DEF_TYPE(name, type, oplist, deque_t, it_t, node_t) \
\
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; \
type data[M_MIN_FLEX_ARRAY_SIZE]; \
} node_t; \
Expand All @@ -127,7 +127,7 @@
The interfaces are compatible. \
*/ \
/* 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 */ \
typedef struct M_F(name, _it2_s) { \
Expand Down
4 changes: 2 additions & 2 deletions m-prioqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
*/
#define M_PR1OQUEUE_DEF_P3(name, type, oplist, prioqueue_t, it_t) \
/* 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_CHECK_COMPATIBLE_OPLIST(name, 1, type, oplist) \
M_PR1OQUEUE_DEF_CORE(name, type, oplist, prioqueue_t, it_t) \
Expand Down Expand Up @@ -476,7 +476,7 @@
\
M_IF_METHOD(GET_STR, oplist)( \
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); \
} \
Expand Down
2 changes: 1 addition & 1 deletion m-serial-bin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Return M_SERIAL_OK_DONE if it succeeds, M_SERIAL_FAIL otherwise */
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;
M_ASSERT(f != NULL && s != NULL);
// First read the number of non null characters
Expand Down
10 changes: 5 additions & 5 deletions m-shared-ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ M_IF_METHOD2(IT_LAST, IT_CREF, 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(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(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); , ) \
Expand All @@ -1305,7 +1305,7 @@ M_IF_METHOD(IN_STR, oplist)( \
{ \
M_ASSERT (out != NULL && file != NULL); \
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) ) \
r = M_CALL_IN_STR(oplist, out->data, file); \
/* even if r is false, we signal the data (no functional impact)*/ \
Expand All @@ -1315,7 +1315,7 @@ M_IF_METHOD(IN_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_F(name, _read_lock)(out); \
Expand All @@ -1329,7 +1329,7 @@ M_IF_METHOD(PARSE_STR, oplist)( \
{ \
M_ASSERT (out != NULL); \
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) ) \
r = M_CALL_PARSE_STR(oplist, out->data, str, endp); \
/* even if r is false, we signal the data (no functional impact)*/ \
Expand All @@ -1354,7 +1354,7 @@ M_IF_METHOD(IN_SERIAL, oplist)( \
{ \
M_ASSERT (out != NULL); \
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) ) \
r = M_CALL_IN_SERIAL(oplist, out->data, serial); \
/* even if r is false, we signal the data (no functional impact)*/ \
Expand Down
2 changes: 1 addition & 1 deletion m-snapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ m_snapsh0t_mrsw_read_end(m_snapsh0t_mrsw_ct s, unsigned int idx)
{ \
M_SNAPSH0T_SPMC_CONTRACT(snap->core); \
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 + snap->core->core->n_reader + M_SNAPSH0T_SPMC_EXTRA_BUFFER); \
M_ASSERT(snap->core->core->n_reader + M_SNAPSH0T_SPMC_EXTRA_BUFFER < UINT_MAX); \
Expand Down
2 changes: 1 addition & 1 deletion m-tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ typedef int32_t m_tr33_index_t;
#define M_TR33_DEF_P4_IO(name, type, oplist, tree_t, it_t) \
M_IF_METHOD(GET_STR, oplist)( \
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, "["); \
it_t it = M_F(name, _it)(tree); \
while (!M_F(name, _end_p)(it)) { \
Expand Down
2 changes: 1 addition & 1 deletion m-worker.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ typedef struct m_work3r_thread_s {

/* Definition of the queue that will record the work orders */
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 */
typedef struct m_worker_s {
Expand Down

0 comments on commit 36d11bc

Please sign in to comment.