diff --git a/README.md b/README.md index bd3798fb..9bafdd4e 100644 --- a/README.md +++ b/README.md @@ -5056,18 +5056,23 @@ Default oplist for C standard types (int & float) ##### M\_CSTR\_OPLIST -Default oplist for the C type const char * +Default oplist for the C type const char *, seen as a constant string. ##### M\_POD\_OPLIST Default oplist for a structure C type without any init & clear -prerequisites. +prerequisites (plain old data). ##### M\_A1\_OPLIST Default oplist for a array of size 1 of a structure C type without any init & clear prerequisites. +##### M\_EMPTY\_OPLIST + +Default oplist for a type that shall not be instanciated. +Each method does nothing. + ##### M\_CLASSIC\_OPLIST(name) Create the oplist with the classic operators using the pattern 'name', i.e. diff --git a/m-core.h b/m-core.h index 3d756705..7ccd6f4b 100644 --- a/m-core.h +++ b/m-core.h @@ -2187,6 +2187,16 @@ m_core_hash (const void *str, size_t length) CLEAR(M_NOTHING_DEFAULT), EQUAL(M_MEMCMP1_A1_DEFAULT), CMP(M_MEMCMP2_A1_DEFAULT), \ HASH(M_HASH_A1_DEFAULT)) +/* Oplist for a type that does nothing and shall not be instanciated */ +#define M_EMPTY_OPLIST \ + (INIT(M_EMPTY_DEFAULT), INIT_SET(M_EMPTY_DEFAULT), \ + SET(M_EMPTY_DEFAULT), CLEAR(M_EMPTY_DEFAULT), \ + INIT_MOVE(M_EMPTY_DEFAULT), MOVE(M_EMPTY_DEFAULT), \ + EQUAL(M_TRUE_DEFAULT), GET_STR(M_EMPTY_DEFAULT), \ + OUT_STR(M_EMPTY_DEFAULT), IN_STR(M_TRUE_DEFAULT), \ + OUT_SERIAL(M_EMPTY_DEFAULT), IN_SERIAL(M_TRUE_DEFAULT), \ + PARSE_STR(M_TRUE_DEFAULT)) + /* Default oplist for C standard types (int & float). Implement generic out_str/in_str/parse_str/get_str function if using C11. Add FILE I/O if stdio.h has been included