Patrick Pelissier
3452b72add
Fix regression of M*LIB:
...
oplist of tuple/variant wasn't able to detect the default INIT creation
as no valid OPLIST was passed in the absence of OPLIST.
Give the explicit default OPLIST in this case.
2018-09-15 15:30:03 +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
8f67ca339b
Rename internal macros.
2018-09-13 22:59:38 +02:00
Patrick Pelissier
1679b7b5cf
Mark ALGO_INIT_VA & ALGO_LET_INIT_VA as obsolete:
...
the M_LET macro supports their feature in a more generic way.
2018-09-10 22:57:52 +02:00
Patrick Pelissier
757049543d
Port to M_CALL infrastructure the M-ALGO
2018-09-10 22:50:26 +02:00
Patrick Pelissier
38b098b547
Port to M_CALL for M-STRING
2018-09-10 21:59:29 +02:00
Patrick Pelissier
60478e3f61
Port to M_CALL for M-SNAPSHOT
2018-09-10 21:55:18 +02:00
Patrick Pelissier
6325f01122
Port to M_CALL M-SHARED
2018-09-10 21:39:38 +02:00
Patrick Pelissier
74c12e6ea2
Port to M_CALL for R/B TREE.
2018-09-10 21:34:18 +02:00
Patrick Pelissier
fd3453bb2a
Port to M_CALL infrastructure M-I-SHARED
2018-09-10 07:55:47 +02:00
Patrick Pelissier
2ff7631c9c
Port to M_CALL infrastructure.
2018-09-10 07:53:07 +02:00
Patrick Pelissier
7a6b0ab641
Port dict to new M_CALL infrastructure to support API transformation.
2018-09-09 14:04:49 +02:00
Patrick Pelissier
8fd0003548
Update
2018-09-08 22:51:46 +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
7c83d733cd
Fix grammar
2018-09-08 20:34:12 +02:00
Patrick Pelissier
6f49a1905c
Minor fix
2018-09-08 20:32:49 +02:00
Patrick Pelissier
d0378aadeb
Update doc
2018-09-08 20:25:38 +02:00
Patrick Pelissier
4834318742
Update doc about missing parse_str methods.
2018-09-08 09:56:25 +02:00
Patrick Pelissier
1838a490ba
Update doc
2018-09-08 09:47:47 +02:00
Patrick Pelissier
de3cbe45b4
Make INIT method optional.
2018-09-08 09:47:36 +02:00
Patrick Pelissier
a34cb6c89d
Simplification
2018-09-08 09:34:01 +02:00
Patrick Pelissier
9c0724ddb9
Simplification.
2018-09-08 09:10:37 +02:00
Patrick Pelissier
ce948bd9ce
Make INIT optional for TUPLE.
2018-09-08 09:02:54 +02:00
Patrick Pelissier
5eb5d2420e
Make INIT method optional for oplists.
2018-09-08 08:57:02 +02:00
Patrick Pelissier
7510e36f6b
Update doc
2018-09-08 08:56:53 +02:00
Patrick Pelissier
8bfdf2bd5f
Add M_IF_METHOD2_BOTH
2018-09-08 08:48:09 +02:00
Patrick Pelissier
2174c28aa2
Make INIT operator optionnal for ARRAY & LIST.
2018-09-08 08:21:13 +02:00
Patrick Pelissier
7a55667a5d
Remove lib (link broken)
2018-09-04 22:15:44 +02:00
Patrick Pelissier
79d0452427
Instead of fixed string, enable using printf like formatting for initialization of a string.
2018-09-02 11:05:27 +02:00
Patrick Pelissier
ad5c141a7c
Enable support to initialize a string_t with a const char[] within M_LET.
2018-09-02 11:00:14 +02:00
Patrick Pelissier
d4cd327ea3
Add API transform call for all operators.
2018-09-02 10:40:09 +02:00
Patrick Pelissier
27b29d5ffe
Clean up & fix DICT_SET_OPLIST
2018-09-01 21:40:17 +02:00
Patrick Pelissier
b52222cad9
Add operator INIT_WITH for oplist with PUSH.
2018-09-01 21:22:18 +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
0e717389c1
Add API transform support for the method in an oplist.
2018-09-01 20:42:51 +02:00
Patrick Pelissier
2197c4ce81
Add more cases to test.
2018-09-01 09:50:28 +02:00
Patrick Pelissier
b894d64063
Add support for INIT_WITH in M_LET in C99 mode.
2018-09-01 09:47:32 +02:00
Patrick Pelissier
d95a11365a
* New method INIT_WITH
...
* Prepare variable number of arguments for M_LET with INIT_WITH
2018-09-01 09:39:09 +02:00
Patrick Pelissier
dbcade3087
Add support for given an argument for the initialization of a variable in M_LET
...
if the variable is within parenthesis:
M_LET((a,b), string_t)
==> It will init a & set it to b.
For the moment, we can only init with value of the same type (through init_set)
2018-08-31 00:02:03 +02:00
Patrick Pelissier
7ac54c0eb8
Update doc
2018-08-29 22:17:52 +02:00
Patrick Pelissier
91c74b863d
Update comments
2018-08-26 09:26:44 +02:00
Patrick Pelissier
8c0b6f1e9d
Fix spellings.
2018-08-25 21:35:37 +02:00
Patrick Pelissier
539f388e66
Update doc (fix spelling).
2018-08-25 09:00:19 +02:00
Patrick Pelissier
b03c312b4e
Update doc
2018-08-25 08:32:51 +02:00
Patrick Pelissier
71db5f9a79
Support for break to break the execution of M_LET
2018-08-25 00:11:20 +02:00
Patrick Pelissier
e33e77595f
Simplify the logic for parsing bool.
2018-08-24 21:03:25 +02:00
Patrick Pelissier
d4016b310d
Add support for conditionnal support for stdio.h
...
(needed for special environnement where no stdio is supported).
2018-08-24 20:59:54 +02:00
Patrick Pelissier
a41177a110
Add support for bool in default type support.
...
Needs to rewritefully how to dispatch the default type for IN_STR method
Add also proper non-support for const char* & char * for IN_STR & PARSE_STR
(We cannot do it reliabelty, so the function says it always fail).
2018-08-24 20:45:26 +02:00
Patrick Pelissier
f8600296f0
Add missing const for dict's equal_p
2018-08-24 19:18:29 +02:00
Patrick Pelissier
e1147fb33d
Add support for IN_STR for default C types.
2018-08-23 19:58:02 +02:00
Patrick Pelissier
ec0d020669
Fix documentation about right prototype of in_str.
2018-08-23 19:38:19 +02:00
Patrick Pelissier
e8eab86546
Fix issue in warning about discarding const attribute.
2018-08-22 00:21:23 +02:00
Patrick Pelissier
c9ebedb01f
Rename _get_ methods for tuple & variants into _get_at_ methods.
...
Add _cget_at_ methods too.
2018-08-21 23:58:03 +02:00
Patrick Pelissier
af5742ce2d
Change the value used to generate the enumerate of a variant:
...
the previous values didn't prevent to have a name collision
with other methods defined for the variant.
2018-08-21 22:53:07 +02:00
Patrick Pelissier
8f85c71654
Rename some internal macros to a better name.
2018-08-21 22:15:11 +02:00
Patrick Pelissier
70753c1082
Add method parse_str for the oplist of default C type.
2018-08-21 20:04:11 +02:00
Patrick Pelissier
2ab2b9efd6
Add primitive to parse standard C types (except const char*)
2018-08-21 19:53:55 +02:00
Patrick Pelissier
dbb34b75fd
Add method for the operator OUT_STR for the default type.
2018-08-21 19:26:18 +02:00
Patrick Pelissier
7447492c76
Fix issue with deque in case of successive _clean:
...
the CLEAR method was called more than once for an object.
2018-08-20 23:13:55 +02:00
Patrick Pelissier
492e4c33db
Adding more assertions to check the good call of the test object.
2018-08-20 23:11:13 +02:00
Patrick Pelissier
cbb08bdcfc
Amend previous commit.
2018-08-19 20:28:46 +02:00
Patrick Pelissier
0de829741a
Add synonimous for pointers.
2018-08-19 20:27:45 +02:00
Patrick Pelissier
0fa7aed1c4
Add missing synonim
2018-08-19 20:07:58 +02:00
Patrick Pelissier
3b0e940284
Add missing _ptr & _srcptr alias.
2018-08-19 17:58:23 +02:00
Patrick Pelissier
48a970ceb9
Avoid using '__' within words.
...
It seems to be a reserved naming of C++.
2018-08-19 11:31:09 +02:00
Patrick Pelissier
c7b533f21e
Cleanup terminology
2018-08-19 10:54:48 +02:00
Patrick Pelissier
839d4da191
Update doc
2018-08-19 10:36:30 +02:00
Patrick Pelissier
b76ddfe93c
Update doc
2018-08-19 10:07:04 +02:00
Patrick Pelissier
4ba0156ad8
Backport solution from tuple to variant.
2018-08-19 08:45:10 +02:00
Patrick Pelissier
6ef9936e24
Fix issue of recusrive definition of TUPLE using GLOBAL oplist:
...
There was a recursive call of M_REDUCE2 that fails to expand properly on its second invocation
Rewrite fully how global oplists are implemented:
it performs a first pass to expand the oplists, and the a separate pass to define the functions.
This enables to separate the pass, and use M_REDUCE2 in both.
2018-08-19 08:28:17 +02:00
Patrick Pelissier
e835dbc7c6
Update Makefile for also testing clang++
2018-08-19 08:27:51 +02:00
Patrick Pelissier
5c8429a7bb
Reformating
2018-08-16 07:29:22 +02:00
Patrick Pelissier
824011657a
Improve once again mapping of the buffer structure to avoid
...
false sharing.
2018-08-15 10:33:20 +02:00
Patrick Pelissier
8e2031bf5a
Add comments.
2018-08-15 10:30:17 +02:00
Patrick Pelissier
8bb5f5475e
Avoid putting the push mutex & the pop mutex inside the same cache line.
...
Avoid false sharing for multi-threading scenario and should increase performance.
2018-08-15 10:21:23 +02:00
Patrick Pelissier
eb4f249a54
Add missing CLEAN method in export OPLIST.
2018-08-14 23:09:12 +02:00
Patrick Pelissier
3aa3b87709
Add missing CLEAN method in export OPLIST.
2018-08-14 23:08:33 +02:00
Patrick Pelissier
0046157862
Fix issue for SWAP method not exported correctly for tuple.
2018-08-14 08:00:16 +02:00
Patrick Pelissier
acbf1efad6
Fix issue: CLEAN method was not properly exported by tuple.
2018-08-14 07:58:37 +02:00
Patrick Pelissier
5d1eb45d5c
Export CLEAN method.
2018-08-14 07:49:31 +02:00
Patrick Pelissier
c52c41c885
Export CLEAN method for tuple if it is defined.
2018-08-13 20:14:37 +02:00
Patrick Pelissier
822f9aacf6
Add CLEAN method for tuple.
2018-08-13 20:05:32 +02:00
Patrick Pelissier
7d5608ca0e
Export CLEAN method for string.
2018-08-13 20:03:06 +02:00
Patrick Pelissier
937bbef818
Add method _erase & _update_further for priority queue.
2018-08-12 21:35:09 +02:00
Patrick Pelissier
c506443ed0
Add comment about ALGO_EXTRACT
2018-08-08 22:54:56 +02:00
Patrick Pelissier
5f42f26587
Fix warning about shadowed variables
2018-08-08 22:49:49 +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
ede57a20be
Add ALGO ALGO_INSERT that allows inserting a container into another one.
2018-08-08 22:44:17 +02:00
Patrick Pelissier
df8306c721
Export IT_INSERT method
2018-08-08 22:43:44 +02:00
Patrick Pelissier
1bb144e256
VARIANT: Oplist is now optional for their definition.
2018-08-07 23:18:37 +02:00
Patrick Pelissier
7d83603646
TUPLE: Oplist is now optional for tuple definition.
2018-08-06 23:20:02 +02:00
Patrick Pelissier
7e4d51bab0
Add support for global oplist for deque
2018-08-05 22:33:13 +02:00
Patrick Pelissier
4ef1b079cb
Can omit optlist in B+TREE definition
2018-08-05 11:08:18 +02:00
Patrick Pelissier
e95d13adb1
Add support for multiple M_LET on the same line
...
without warning about shadow variables.
2018-08-04 08:34:35 +02:00
Patrick Pelissier
92d7009804
Fis 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:35:37 +02:00
Patrick Pelissier
354327e40b
Fix issue for string_strim if string was empty and not allocated.
2018-08-03 20:23:24 +02:00
Patrick Pelissier
34d56c54c8
Test strim with an empty string.
...
(Shall do nothing).
2018-08-03 20:22:32 +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
030510613c
Add more assertions.
2018-08-03 19:57:38 +02:00
Patrick Pelissier
984b8e7da0
Fix const cast issue for 'void *' pointer.
2018-08-03 18:55:01 +02:00