Update comments

This commit is contained in:
Patrick Pelissier committed 2022-10-12 23:26:33 +02:00
1 parent 3f0e8956b8
commit 93229c61f2
2 files changed
+11 -4

No files matched your search

+5 -2
View File
@@ -28,7 +28,7 @@
#include "m-core.h"
/* Define different kind of basic algorithms named 'name' over the container
which oplist is 'contOp', as static inline functions.
which oplist is 'cont_oplist', as static inline functions.
USAGE:
ALGO_DEF(algogName, containerOplist|type if oplist has been registered) */
#define M_ALGO_DEF(name, cont_oplist) \
@@ -45,8 +45,9 @@
(M_ALG0_FOR_EACH, M_ALG0_FOR_EACH_ARG) \
(container, M_GLOBAL_OPLIST(cont_oplist), __VA_ARGS__)
/* Map a function (or a macro) to all elements of a container
into another container.
and store it into another container.
USAGE:
ALGO_TRANSFORM(contDst, contDOplist|type_if_registered_oplist, contSrc, contSrcOplist|type_if_registered_oplist,
function[, extra arguments of function]) */
@@ -55,6 +56,7 @@
(M_ALG0_TRANSFORM, M_ALG0_TRANSFORM_ARG) \
(contD, M_GLOBAL_OPLIST(contDop), contS, M_GLOBAL_OPLIST(contSop), __VA_ARGS__)
/* Extract a subset of a container to copy into another container.
USAGE:
ALGO_EXTRACT(contDst, contDstOplist|type_if_registered_oplist, contSrc, contSrcOplist|type_if_registered_oplist
@@ -65,6 +67,7 @@
M_IF_NARGS_EQ2(__VA_ARGS__)(M_ALG0_EXTRACT_FUNC, M_ALG0_EXTRACT_ARG)) \
(contD, contDop, contS, __VA_ARGS__)
/* Perform a Reduce operation over a container.
USAGE:
ALGO_REDUCE(dstVar, container, contOplist|type_if_registered_oplist, reduceFunc
+6 -2
View File
@@ -4444,7 +4444,7 @@ m_core_parse2_enum (const char str[], const char **endptr)
M_EMPLACE_ASS_ARRAY_DEF_EXPAND_KEY(name, name_t, function_name, key_oplist, val_oplist, macro_both, macro_key, macro_val, key_emp_type, val_emp_type) \
M_EMPLACE_ASS_ARRAY_DEF_EXPAND_VAL(name, name_t, function_name, key_oplist, val_oplist, macro_both, macro_key, macro_val, key_emp_type, val_emp_type) \
M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_B(name, name_t, function_name, key_oplist, val_oplist, macro_both, macro_key, macro_val, M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_EMP_TYPE(key_emp_type), M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_EMP_TYPE(val_emp_type) )
/* Transform all forms to the generic LIST form */
/* Transform all supported user forms to the generic LIST form */
#define M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_EMP_TYPE(val_emp) \
M_IF(M_PARENTHESIS_P(val_emp))(M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_EMP_TYPE_PARENTHESIS, M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_EMP_TYPE_B)(val_emp)
#define M_EMPLACE_ASS_ARRAY_DEF_EXPAND_BOTH_EMP_TYPE_B(val_emp) \
@@ -4516,7 +4516,11 @@ m_core_parse2_enum (const char str[], const char **endptr)
M_EMPLACE_CALL_FUNC(aval, val_init_func, val_oplist, *val, val_emplace_type); \
} \
/* Generic emplace for a queue like container */
/* Definition of the emplace_back function for queue.
It is defined here so that this definition is shared accross different
kind of kind of queue.
This definition is far from being efficient but works for the current interface.
*/
#define M_EMPLACE_QUEUE_GENE(name, name_t, function_name, oplist, init_func, exp_emplace_type) \
static inline void \
function_name(name_t v \