Patrick Pelissier
6fd2610eec
Fix valgrind warning
2024-05-01 23:39:49 +02:00
Patrick Pelissier
11bf5e4691
Fix C++ compatibility and compound literals...
2024-05-01 23:08:29 +02:00
Patrick Pelissier
04d4bf6866
Complete new version of normal dictionary :
...
* limits: max elements is 0.75*2^32
* much faster
* use less memory
2024-05-01 22:39:36 +02:00
Patrick Pelissier
d22e75d7a0
Make I/O functions exception aware.
...
Simplify their logic
Fix other bugs.
2024-03-08 00:15:08 +01:00
Patrick Pelissier
26cec1591a
* Remove some obsolete macros
...
* Fix spelling
* A little bit of refactoring
2024-01-19 21:37:47 +01:00
Patrick Pelissier
52b58c5a51
Happy new year 2024
2024-01-19 21:37:47 +01:00
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
a27b0b4014
Fix wrong parsing of malformed dict.
2023-04-10 23:08:51 +02:00
Patrick Pelissier
28faf815d7
Improve robustness against broken I/O file
2023-04-03 14:09:34 +02:00
Patrick Pelissier
669a3297c7
Fix issue in ispace usage and allow more space in formating (to be more uniform. The allowed spaces before were in strange place only)
2023-04-03 13:18:10 +02:00
Patrick Pelissier
7534aa0d61
Add internal M_UNLIKELY_NOMEM to help coverage computation
2023-04-03 00:05:29 +02:00
Patrick Pelissier
f69cec6820
Fix warning with clang+const char * type
2023-03-24 21:53:23 +01:00
Patrick Pelissier
2f76652f2b
Maintenance
2023-03-03 22:50:14 +01:00
Patrick Pelissier
a2ae209992
Happy new year
2023-01-02 12:57:41 +01:00
Patrick Pelissier
d6b9b054c2
Fix emplace generation
...
(incorrect value oplist)
2022-10-03 22:34:13 +02:00
Patrick Pelissier
0fec33b38e
* Add emplace generation for dict/hashmap.
...
(still need more tests).
* Factorize emplace generation for R+TREE/Prioqueue
2022-10-02 22:24:22 +02:00
Patrick Pelissier
6241a3093c
Factor comments.
2022-10-02 21:35:52 +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
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
4d5cd9c635
Code generation shows no difference between && or & for simple & typical OOR values
...
So let's use the logical comparaison which is clearer.
2022-04-19 22:07:01 +02:00
Patrick Pelissier
33ba602aef
Reformat
2022-04-18 22:10:32 +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
22674f2b46
Fix format
2022-03-14 19:28:49 +01:00
Patrick Pelissier
19b01b404d
Migrate to 2022
2022-03-12 20:25:45 +01:00
Tim Gates
7b6bfac7cb
docs: Fix a few typos
...
There are small typos in:
- example/ex-algo03.c
- m-algo.h
- m-core.h
- m-dict.h
- m-string.h
Fixes:
- Should read `occurrence` rather than `occurence`.
- Should read `fulfilled` rather than `fullfilled`.
- Should read `dictionaries` rather than `dictionnaries`.
- Should read `environment` rather than `environement`.
- Should read `unordered` rather than `undordered`.
2021-12-23 10:00:44 +11:00
Patrick Pelissier
1a1339da6b
Remove deprecated features
2021-11-20 13:05:50 +01:00
Patrick Pelissier
92fa4691d1
Add comment about the non presence of _it_remove
2021-11-09 21:20:16 +01:00
Patrick Pelissier
570dedf1c3
Factorize _size & _empty_p for both dict
2021-11-06 13:54:17 +01:00
Patrick Pelissier
59e5c873ad
Factorize _equal_p for both dict
2021-11-06 13:45:27 +01:00
Patrick Pelissier
8dbcdf9991
Uniformize field name between classic dict & OA dict
2021-11-06 13:38:49 +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
510cd062ba
Rename DICT, TUPLE & VARIANT _clean in _reset to avoid confusing _clean & _clear functions. See #97
2021-10-28 17:51:17 +02:00
Patrick Pelissier
e99fd23e69
Don't export IT_REF for DICT_SET as they should not be updated directly by algorithm
2021-10-14 21:23:37 +02:00
Patrick Pelissier
7a08ddce9e
Remove UPDATE opertor as there are no default operators that define it (and no one uses it as it is poorly documented). Replace by SET for RB-THREE. Replace by ADD for the splice function of dictionary
2021-10-02 13:06:30 +02:00
Patrick Pelissier
a950e15625
Adding method for NAME operator for basic containers
2021-06-12 11:11:30 +02:00
Patrick Pelissier
333047fc4c
Make assertions more robust.
...
Fix read out of bound (with test cases).
2021-02-14 00:15:43 +01:00
Patrick Pelissier
56b2adc57d
Fix internal name.
2021-02-13 11:45:16 +01:00
Patrick Pelissier
a73bee2650
Micro-optimization of DICT_OA
...
by reducing the number of cmp instructions.
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
1671ca8d67
Add more assertions
2020-12-21 15:16:16 +01:00