Patrick Pelissier
422f3c2c04
Add GENTYPE operator to all oplists
2023-12-30 16:23:02 +01:00
Patrick Pelissier
b50813713a
Define internal M_INLINE:
...
it is used to control the inline semantics.
By combining it with optimize option "-fno-inline"
for the internal M*LIB function (using _Pragma optimize)
we can control easily if we want to use an inline version
or call of an external function.
Define new user API:
* M_USE_EXTERN_DECL : define it before including any MLIB header to requests to call the M*LIB functions and don't inline then.
* M_USE_EXTERN_DEF : define it once in a translation unit to define the M*LIB functions. This translation unit shall contain all templated macro too.
If you use one option, you need to use the other one too for another translation unit.
2023-06-11 23:32:02 +02:00
Patrick Pelissier
302c5eb300
Remove export passthrough of NEW/DEL/REALLOC/FREE interface
...
from the container oplist.
It has no real practical purpose.
NEW/DEL/REALLOC/FREE shall be a property of the container
to be defined, and not a property for an already defined container.
2023-04-29 10:50:04 +02:00
Patrick Pelissier
219c62ff5d
Provide a way to alter the standard naming convention for the functions
...
Close #72
2023-04-22 09:33:08 +02:00
Patrick Pelissier
da3e71c676
Fix introduced warning in release mode
2023-04-08 11:23:32 +02:00
Patrick Pelissier
095bf7070d
Rewrite loop to avoid final assert(0)
2023-04-06 21:55:06 +02:00
Patrick Pelissier
7534aa0d61
Add internal M_UNLIKELY_NOMEM to help coverage computation
2023-04-03 00:05:29 +02:00
Patrick Pelissier
2f76652f2b
Maintenance
2023-03-03 22:50:14 +01:00
Patrick Pelissier
8e58f7d637
Factorize into smaller generation macros. Add emplace support for MPMC/SPSC queues
2023-02-01 20:58:28 +01:00
Patrick Pelissier
254beaf3c7
Factorize into smaller generation macros
2023-02-01 20:43:01 +01:00
Patrick Pelissier
a2ae209992
Happy new year
2023-01-02 12:57:41 +01:00
Patrick Pelissier
77008b8622
Fix leak of memory in non optimized _safe_get
...
of B+Tree.
2022-10-03 23:07:13 +02:00
Patrick Pelissier
d6b9b054c2
Fix emplace generation
...
(incorrect value oplist)
2022-10-03 22:34:13 +02:00
Patrick Pelissier
9eed4be97c
Add emplace support for B+Tree
2022-10-03 22:16:50 +02: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
10440320d1
Remove IT_REF from exported oplist as the items shall appear as not modifiable by algorithms
2022-05-09 20:12:39 +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
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
826d251ffe
Rename RBTREE & BPTREE _clean in _reset to avoid confusing _clean & _clear functions. See #97
2021-10-28 17:55:54 +02:00
Patrick Pelissier
a950e15625
Adding method for NAME operator for basic containers
2021-06-12 11:11:30 +02:00
Patrick Pelissier
e28d403216
Undo previous changes until further analysis (it broke CI)
2021-03-28 11:53:18 +02:00
Patrick Pelissier
4b71bbec7e
Protect key from being changed while iterating.
2021-03-28 11:13:55 +02:00
Patrick Pelissier
60cfc63c4e
Add static assertion.
2021-03-28 09:39:52 +02:00
Patrick Pelissier
58fc40d0f1
Update oplist
2021-03-28 09:32:23 +02:00
Patrick Pelissier
3d7e9e7c03
Add _get_at method for B+TREE
2021-03-28 09:29:04 +02:00
Patrick Pelissier
8e9aa9cac4
Fix _min & _max for B+Tree
...
Make code match the documentation if there is no element in the tree.
2021-02-23 15:59:45 +01:00
Patrick Pelissier
6636800c5b
Remove obsolete / deprecated function/macros.
2021-02-13 11:45:16 +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
0818d0ac7c
Fix macro formatting.
2020-10-23 21:46:34 +02:00
Patrick Pelissier
54d4b80368
Reformat macro to 80 characters
2020-10-21 23:23:40 +02:00
Patrick Pelissier
895f362628
Fix a majorant stack usage of B+TREE
2020-10-17 22:46:43 +02:00
Patrick Pelissier
d24b52586d
Put a type within internal namespaces.
2020-10-17 22:25:22 +02:00
Patrick Pelissier
1e534bd307
Rename derefence type of an iterator of a dict or a B+Treee into _ittref_t.
2020-10-16 21:01:29 +02:00
Patrick Pelissier
c039f07f2d
Add macros
...
BPTREE_DEF2_AS
BPTREE_DEF_AS
BPTREE_MULTI_DEF2_AS
BPTREE_MULTI_DEF_AS
2020-10-03 14:07:14 +02:00
Patrick Pelissier
b396b42808
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
8a6652646a
Fix formatting (Replace TAB with SPACE)
2020-07-14 00:34:59 +02:00
Patrick Pelissier
8a36b5ff15
Workaround to avoid CLANG unused function warnings
2020-07-09 22:14:00 +02:00
Patrick Pelissier
279b46b4e2
Fix -Wsign-conversion warnings.
2020-06-13 19:43:38 +02:00