Commit Graph
151 Commits
Author SHA1 Message Date
Patrick Pelissier 97ff413f01 Maintenance:
Separate big macros into several smaller ones
2023-01-22 23:33:13 +01:00
Patrick Pelissier a2ae209992 Happy new year 2023-01-02 12:57:41 +01:00
Patrick Pelissier abffe201e5 Change the suffix of the functions dealing with C-String to _cstr
instead of _str.
See #99 for details.
2022-07-30 12:00:55 +02:00
Patrick Pelissier 95b104ee48 Issue in generation of functions:
if the method in the oplist uses API_* transformation,
if this method is a macro itself,
it may delay the expansion too much and
the macro may not be expanded at all in the final code generation.

Fix issue by adding a supplementary evaluation in the macro expansion.
Add test cases
2022-05-06 01:10:31 +02:00
Patrick Pelissier 74764e2d6f Fix issues in stable_sort: wrong assertion & missing init_move 2022-04-26 21:35:51 +02:00
Patrick Pelissier d85955ef60 Add generation of emplace functions 2022-04-20 22:43:12 +02:00
Patrick Pelissier e1abf0528c Rename M_DEFAULT_OPLIST in M_BASIC_OPLIST (cleaner name) 2022-04-08 22:54:29 +02:00
Patrick Pelissier b8cd679679 Move generating macro into the m_ namespace and create a wrapper using historical names for compatibility with existing code 2022-03-24 20:46:49 +01:00
Patrick Pelissier 5e57338928 Rename string_ into m_string_ in header files (Test files still test classic API) 2022-03-20 18:30:32 +01:00
Patrick Pelissier 19b01b404d Migrate to 2022 2022-03-12 20:25:45 +01:00
Patrick Pelissier 1a1339da6b Remove deprecated features 2021-11-20 13:05:50 +01:00
Patrick Pelissier a9fc7e15f8 Rename GET_SET_KEY operator in SAFE_GET_KEY operator 2021-10-30 23:57:50 +02:00
Patrick Pelissier 6b064870f5 Rename CLEAN operator in RESET operator 2021-10-30 23:26:27 +02:00
Patrick Pelissier 51d4e930f5 Rename the suffix _get_at to the _safe_get suffix
(Better & clearer naming of the function)
2021-10-30 00:04:07 +02:00
Patrick Pelissier f172bbaad2 Rename ARRAY _clean in _reset to avoid confusing _clean & _clear functions. See #97 2021-10-28 17:32:02 +02:00
Patrick Pelissier c2e19fed01 Fix issue in IT_INSERT (Wrong behavior if IT==END) 2021-09-29 23:29:57 +02:00
Patrick Pelissier 39eeb3aec7 Fix buffer overflow in ARRAY _pop_at function (reported by tyrone718) 2021-09-18 09:52:33 +02:00
Patrick Pelissier 2178dcfcab Add LIST_INIT_VALUE & LIST_DUAL_PUSH_INIT_VALUE. 2021-08-15 21:55:09 +02:00
Patrick Pelissier f8b4f44105 Add ARRAY_INIT_VALUE 2021-08-15 21:44:36 +02:00
Patrick Pelissier 8ce59c2e9d Maintenance:
* update comments
* simplify code.
2021-08-07 00:34:18 +02:00
Patrick Pelissier ca8d4aa97a Update _back & _front to return a modifiable ptr
(There is no real reasons to return a const pointer).
2021-07-03 23:59:19 +02:00
Patrick Pelissier dedb79dbc5 Use of new initializer macro 2021-07-01 22:12:15 +02:00
Patrick Pelissier a950e15625 Adding method for NAME operator for basic containers 2021-06-12 11:11:30 +02:00
Patrick Pelissier e25e9ba29b Make the contract of Array & Buffer fail after a clear. 2021-02-21 21:08:35 +01:00
Patrick Pelissier 517da1b999 Rename generated internal functions
to avoid "poluting" userspace naming.
2021-02-13 11:45:05 +01:00
Patrick Pelissier 25497bd96f Factorize code so that _DEF macros use _DEF_AS ones 2021-02-07 23:04:59 +01:00
Patrick Pelissier 25fe26deaa Happy new year 2021-01-13 20:18:01 +01:00
Patrick Pelissier 1b4c608087 Rename operator TEST_EMPTY into EMPTY_P to be compliant with iterator operator 2021-01-07 22:13:10 +01:00
Patrick Pelissier a29682ca29 Create M_ASSERT macro to encapsulate assert within M*LIB
The goal is to enable the user to override this macro if needed so that it can enable or disable the M*LIB witout impacting its own assertions.
2020-10-29 22:46:17 +01:00
Patrick Pelissier 6f761091cc Update comment. 2020-10-24 23:07:29 +02:00
Patrick Pelissier 54d4b80368 Reformat macro to 80 characters 2020-10-21 23:23:40 +02:00
Patrick Pelissier e04b120d41 Add new macros _DEF_AS so that
user can define its own name for the generated types.
2020-10-03 14:07:14 +02:00
Patrick Pelissier eb8b106f48 Update comments. 2020-10-03 14:07:14 +02:00
Patrick Pelissier b3a1a75f6f Rename internal types:
a suffix ending with _ct means confidential type
ans is reserved for M*LIB internal usage.

OPLIST doesn't use the external types
but rather the internal types.
It enables to be independent of the real names
of the external types.
Such external names are planned to be fully customizable
(i.e. the user may define a name that suits its coding style)
2020-10-03 14:07:14 +02:00
Patrick Pelissier 784c42d850 Update _insert functions to update
iterators as per new specification.
2020-07-19 00:55:35 +02:00
Patrick Pelissier 8a36b5ff15 Workaround to avoid CLANG unused function warnings 2020-07-09 22:14:00 +02:00
Patrick Pelissier 56e4cda76c Make INIT_SET & SET operators of arrays as optional 2020-06-25 22:49:25 +02:00
Patrick Pelissier 8216ef0f7b Factorization of check of index
So that it can be reused for other modules.
2020-06-05 20:30:07 +02:00
Patrick Pelissier b897027021 Add user customizable ARRAY macro
for checking if index is within the allowedd bounds even in release mode
2020-06-05 00:11:22 +02:00
Patrick Pelissier 6095cf8610 Reindent file. 2020-06-04 23:51:17 +02:00
Patrick Pelissier 78d0bfb286 Port new error oplist format to all containers. 2020-05-30 18:00:43 +02:00
Patrick Pelissier 9340c2e55c Fix memory leak for _parse_str in case of error. 2020-05-24 19:50:32 +02:00
Patrick Pelissier d1ae26f0fd * Add control than the type and the oplist are compatible 2020-05-17 10:27:30 +02:00
Patrick Pelissier 743959ebde Fix micro performance issue 2020-05-16 14:09:49 +02:00
Patrick Pelissier 49a2e600c4 Add control of sub-oplist when creating a new oplist of a container
Add test case of this new control
Fix some corner bugs in some containers evolving their own oplists.
2020-05-15 21:19:39 +02:00
Patrick Pelissier 055e74d350 Add more check for valid oplists before expanding further 2020-05-09 16:10:56 +02:00
Patrick Pelissier 34f70a031f Use M_STATIC_FAILURE to stop expanding methods in case of detected failure 2020-05-09 10:56:05 +02:00
Patrick Pelissier 4f7b0b9455 Happy new year 2020 2020-01-04 15:41:06 +01:00
Patrick Pelissier 90f248fbe8 Rename interface field of serial object into m_interface (WINDOWS compatibility as it defines a macro called interface) 2019-12-06 21:13:37 +01:00
Patrick Pelissier 7a6239912e Simplify code 2019-07-12 12:30:04 +02:00