Commit Graph
74 Commits
Author SHA1 Message Date
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
Patrick Pelissier 34943e5b2a Remove array_ prefix from ARRAY_DEF
See commit on shared pointers.
2017-07-27 22:16:15 +02:00
Patrick Pelissier 6b90342297 Fix forgotten assertion.
Replace fprintf by fputc (faster)
2017-07-11 14:55:23 +02:00
Patrick Pelissier f08685b097 Fix issue with reserve for array. 2017-07-11 09:32:44 +02:00
Patrick Pelissier 7d00caac83 Add const to iterators:
in fact, a const array for an iterator just means that it
 can't modify the order of the container (And that's what we want).
 It can still modify the pointed object.
2017-07-07 22:57:13 +02:00
Patrick Pelissier 64f3fc380e Update _insert prototype of array to match list _insert. 2017-07-07 22:53:42 +02:00
Patrick Pelissier 2155df7d6f Fix bug detected by previous test. 2017-07-06 10:26:14 +02:00
Patrick Pelissier 93ff9c79b9 Rewrite comment (bis) 2017-07-06 10:20:13 +02:00
Patrick Pelissier 8bfb57cdb6 Rewrite comment 2017-07-06 10:19:57 +02:00
Patrick Pelissier c3114c439b Remove a contract from _clear since it has not to be true.
Add const to a proto.
2017-07-06 10:19:08 +02:00
Patrick Pelissier dbe24395f4 Add 'const' to _out_str & _equal_p
(==> rewrite the iteration loop)
2017-07-05 22:15:12 +02:00
Patrick Pelissier 6f21ee9098 Add TODO 2017-07-05 16:13:48 +02:00
Patrick Pelissier b3a4ffb962 Use of M_CONST_CAST for array. 2017-05-26 15:44:28 +02:00
Patrick Pelissier 0089b9fe83 Remove last eol 2017-05-24 11:52:41 +02:00
Patrick Pelissier 5386f9a2f7 Update comments.
Update hash function.
2017-05-24 11:47:35 +02:00
Patrick Pelissier 3e62d6c719 Export IT_REMOVE operator from array & list 2017-05-22 21:23:39 +02:00
Patrick Pelissier d345284faf Uniformization with list _remove operator. 2017-05-22 21:20:16 +02:00
Patrick Pelissier e1b1f5e861 remove expects now an iterator.
<== Uniformisation of the containers.
(List expect an iterator too).
2017-05-22 19:25:30 +02:00
Patrick Pelissier a65c80d25a Fix bug in insert_v (missing initialisation).
Update API of insert_v to give the number of elements to insert (much more logic).
2017-05-02 20:17:16 +02:00