Commit Graph
92 Commits
Author SHA1 Message Date
Patrick Pelissier 31a5d7ee3b Add oplist 2018-10-30 10:56:02 +01:00
Patrick Pelissier 02d4bf0e09 Export method _empty_p for operator TEST_EMPTY for all containers. 2018-10-29 11:06:54 +01:00
Patrick Pelissier 1c637f1182 Proper export of KEY_OPLIST & VALUE_OPLIST 2018-10-28 11:17:05 +01:00
Patrick Pelissier 70179bb1d7 Add VALUE_TYPE operator 2018-10-28 10:33:25 +01:00
Patrick Pelissier 83226c5ce8 Add KEY_TYPE operator 2018-10-28 10:03:47 +01:00
Patrick Pelissier 3d6b737c46 Export *KEY operators in OPLIST for array, dict, B+tree 2018-10-27 23:37:06 +02:00
Patrick Pelissier 6672becdd5 Add _erase for array 2018-10-27 23:30:21 +02:00
Patrick Pelissier f7f7d7bc38 Add asertion 2018-10-27 22:34:53 +02:00
Patrick Pelissier 6b5434d64f Fix regression:
even if there is no INIT method for the base type,
the container still defines a INIT method.
2018-10-21 22:27:52 +02:00
Patrick Pelissier e0c456490a Fix definition of oplist for containers:
if no argument is given, it shall behave as if it was defined with
a standard C type.
2018-09-15 17:59:50 +02:00
Patrick Pelissier 2e3b312fab Fix issue of recursive usage of M_GLOBAL_OPLIST_OR_DEF
Update the way to use the macro to avoid being limited by the
preprocessor limitation.
2018-09-14 20:57:55 +02:00
Patrick Pelissier bb8de993b6 Start porting to M_CALL infrastructure, enabling support for
API transformation.
2018-09-08 22:49:12 +02:00
Patrick Pelissier 5eb5d2420e Make INIT method optional for oplists. 2018-09-08 08:57:02 +02:00
Patrick Pelissier 2174c28aa2 Make INIT operator optionnal for ARRAY & LIST. 2018-09-08 08:21:13 +02:00
Patrick Pelissier 822c27399c Add M_INIT_VAI to initialize a container with a VA.
(pretty much like it was done for ALGO).
Use if for array & list so that you can init them in M_LET
by giving it a VA.
2018-09-01 21:12:02 +02:00
Patrick Pelissier 91c74b863d Update comments 2018-08-26 09:26:44 +02:00
Patrick Pelissier e8eab86546 Fix issue in warning about discarding const attribute. 2018-08-22 00:21:23 +02:00
Patrick Pelissier 3b0e940284 Add missing _ptr & _srcptr alias. 2018-08-19 17:58:23 +02:00
Patrick Pelissier f84e96d790 Reexport IT_INSERT for array.
Even it is slow, it may be useful.
2018-08-08 22:49:25 +02:00
Patrick Pelissier 143a5fdf4f Fix issue if given type is a T * = TYPE:
token pasting created const T *, which is not the same as
const TYPE = T * const
2018-08-03 20:20:57 +02:00
Patrick Pelissier f962bc8da5 Avoid overflow in case of huge computations.
Add more comments.
2018-07-22 21:32:19 +02:00
Patrick Pelissier 96202aa78f Do not use reserved identifiers of the C standard (See 7.1.3 Reserved identifiers) 2018-07-14 14:35:14 +02:00
Patrick Pelissier d1f2b62f66 Replace _set_at2 by _get_at for array.
(Break API)
2018-07-01 22:35:05 +02:00
Patrick Pelissier 17e715f408 Remove _last as it is a duplicate with _back! 2018-06-23 11:07:06 +02:00
Patrick Pelissier c821d9ea65 Add methods _front & _last for arrays. 2018-06-23 11:05:29 +02:00
Patrick Pelissier 337b568b5e Update comments. 2018-06-02 19:21:59 +02:00
Patrick Pelissier d0fe7f3e25 Add method _push_move & _pop_move.
Add assertion on _pop_back to check that the container is not empty.
2018-05-19 11:21:57 +02:00
Patrick Pelissier 73f8baf464 Add method _parse_str for array. 2018-05-03 17:29:10 +02:00
Patrick Pelissier 2eaeb26d4c Make Serialization input of array / dict more flexible
by supporting space characters within the input.
2018-04-30 11:02:42 +02:00
Patrick Pelissier dcfbe53713 Fix conformity bug in _splice. 2018-04-20 19:30:45 +02:00
Patrick Pelissier 12b15e0037 Add function array_splice just like function list_splice
as it can be done faster at low level.
2018-04-15 11:41:32 +02:00
Patrick Pelissier b5f4f2fc4b Finish splitting m_core_clz into m_core_clz32 & m_core_clz64 2018-04-15 00:10:38 +02:00
Patrick Pelissier f88b53dce5 Fix issue 2018-03-14 23:51:43 +01:00
Patrick Pelissier 3e609bab04 Add method pop_until 2018-03-14 23:46:30 +01:00
Patrick Pelissier a6bf530c5f Remove a warning. 2018-03-14 22:19:16 +01:00
Patrick Pelissier 5307b6c097 Add stable sort for array 2018-03-11 00:36:38 +01:00
Patrick Pelissier 210e05f7fc Update copyright to 2018 2018-01-29 20:28:30 +01:00
Patrick Pelissier 2089af8fd3 Fix broken code due to previous commits. 2018-01-24 22:26:46 +01:00
Patrick Pelissier 0b44a55b6a Replace method EXPECTED_SIZE by INC_ALLOC so that all the way of increasing
the size in case of reallocation can be configured and not only the minimum
size.
2017-09-16 18:46:22 +02:00
Patrick Pelissier 95f467f4be Fix potential bug in case of ill-formed serialized container. 2017-09-16 13:30:09 +02:00
Patrick Pelissier 2e564088b0 Simplify the inclusion of headers. 2017-09-16 10:14:45 +02:00
Patrick Pelissier 1930bdeac1 _DEF macros checks if a global oplist is register if there is no one
given in the macro call. If it founds one, it will be it instead
of M_DEFAULT_OPLIST.
2017-09-16 08:31:22 +02:00
Patrick Pelissier 6c71265c8b Minor cleanup 2017-09-11 22:54:31 +02:00
Patrick Pelissier a6a89f269f Simplify code. 2017-09-11 22:49:48 +02:00
Patrick Pelissier 44cdfa0c77 Remove use of feof and ferror as it is not needed as the return of fgetc
is sufficent.
2017-08-19 21:05:55 +02:00
Patrick Pelissier cad4d92a00 _set of a aarray will create only a copy which fits exactly in
what is needed. No need for extra space.
2017-08-18 21:25:25 +02:00
Patrick Pelissier ffc383884d Add macro M_HASH_FINAL 2017-08-17 20:22:01 +02:00
Patrick Pelissier 32d5f7037b Fix issue: _insert didn't insert after the iterators. 2017-08-14 19:52:04 +02:00
Patrick Pelissier 14c50a5b9a Fix overflow issues when computing new size for the array. 2017-08-06 22:39:42 +02:00
Patrick Pelissier f8a1832fce Fix conflict between the specialized version of sort in array
and the generic version in algo so that we can use the same
prefix for both generation.
2017-07-27 22:19:27 +02:00