Commit Graph

45 Commits

Author SHA1 Message Date
Guillaume Friloux 537bc81acb From: Guillaume Friloux <guillaume.friloux@asp64.com>
Hello again e people, i have play a bit with eina's comments to get
proper namings and fix broken references.



SVN revision: 67289
2012-01-18 04:32:37 +00:00
Vincent Torri 2c85cff20b Eina: improve a bit the doc
SVN revision: 65987
2011-12-07 12:07:18 +00:00
Lucas De Marchi d091773382 eina: provide a C++-compatible version of _EINA_INLIST_CONTAINER
In C++ we can't assign a void pointer to another type pointer without casts. We
now rely on typeof() operator *when using C++*.

We may provide another version later for those compilers without typeof()
support.



SVN revision: 63568
2011-09-23 17:02:02 +00:00
Cedric BAIL 60d03bc2d2 eina: fix eina inlist sorted insert (with and without state)
SVN revision: 63398
2011-09-14 22:04:37 +00:00
Cedric BAIL 336806d264 eina: oops. Thanks Vincent.
SVN revision: 63214
2011-09-05 20:26:21 +00:00
Cedric BAIL 6936745755 eina: add eina_inlist_sorted_state_insert and helper.
Note: this function help keep a jump table so we reduce
the need to walk over the complete list to insert one
element. It's of course doesn't make it an O(log(n)) in
access time, but it increase it's cost more slowly.
   With 10000 items, you can count around 50 pointers
dereferencing and with with 50000 items around 200 pointers
dereferencing.
   Of course the comparison stay in O(log(n)).


SVN revision: 63213
2011-09-05 20:15:12 +00:00
Jonas M. Gastal cd8cd93209 Eina: Groups shouldn't be inside themselves, and both groups
and conditionals need to be properly closed..



SVN revision: 61413
2011-07-15 18:37:44 +00:00
Jonas M. Gastal 2d6dec2b4e Eina: Making html tags in doc appear only in html doc.
SVN revision: 61412
2011-07-15 18:35:45 +00:00
Jonas M. Gastal eff8c0568e Eina: Giving some pages better names and fixing a typo.
SVN revision: 61411
2011-07-15 18:33:41 +00:00
Jonas M. Gastal c0d8ef9ede Eina: Adding images for latex docs.
SVN revision: 60452
2011-06-17 14:20:59 +00:00
Rafael Antognolli 5ab79258a2 eina: Add detailed description and some examples to Eina_Inlist.
SVN revision: 60310
2011-06-14 17:43:53 +00:00
Cedric BAIL 9aa4942caa eina: make him happy.
SVN revision: 59876
2011-06-01 15:04:29 +00:00
Cedric BAIL cde3148eca eina: add eina_inlist_sorted_insert.
SVN revision: 59654
2011-05-24 15:17:56 +00:00
Cedric BAIL ca83ca2ff4 eina: add eina_inlist_sort (merge sort based on eina_list code).
SVN revision: 58540
2011-04-11 09:55:27 +00:00
Carsten Haitzler 54bf7e1c01 more dox -> .h
SVN revision: 58427
2011-04-07 12:21:50 +00:00
Mike Blumenkrantz b48b7eb6ea +EINA_INLIST_FOREACH_SAFE
it looks crazy, but it works somehow


SVN revision: 57080
2011-02-16 09:34:27 +00:00
Mike Blumenkrantz 58ff455b69 inglishicize some ducks
SVN revision: 56344
2011-01-28 16:05:12 +00:00
Mike Blumenkrantz 0c27fd1a29 ecrustify testing: looked good so I'm committing for other people to review as well
SVN revision: 53800
2010-10-23 06:41:45 +00:00
Carsten Haitzler f4b68549cb formatting. ok - maybe we can have a debate on it, but its better than
it was before. debate up for grabs for now. wont touch other lib
headers until resolved for eina. it's the worst anyway.



SVN revision: 51156
2010-08-16 06:14:19 +00:00
Mike Blumenkrantz 44eeac0e1e BOW DOWN BEFORE ME, FOR I HAVE MADE THESE HEADERS READABLE ONCE MORE!
SVN revision: 51065
2010-08-13 06:36:33 +00:00
Carsten Haitzler bed21c315d errrr... hmmm why did this change?
SVN revision: 50574
2010-07-28 02:48:11 +00:00
Carsten Haitzler ddc6ba2c2a uncrustify eina.
SVN revision: 50573
2010-07-28 02:37:05 +00:00
Vincent Torri 09d1853ea0 * finish benchmark tutorial
* move internal _init and _shutdown functions in the Global
   part of the code, as it is where they belong
 * fix minor documentation stuff


SVN revision: 44730
2009-12-27 08:45:30 +00:00
Cedric BAIL 17c820aef7 * eina: This initialisation is not needed, but will reduce llvm warning noise.
SVN revision: 42935
2009-10-07 12:06:52 +00:00
Iván Briano bbce7b5e0d Avoid clashes.
SVN revision: 42368
2009-09-09 15:53:50 +00:00
Iván Briano 555de0f914 Support EINA_INLIST to be anywhere in the struct with _FOREACH macros.
Fix pointer arithmetic with EINA_CONTAINER_GET.
Change Inlist test to have the int first and not assume a direct cast works.


SVN revision: 42366
2009-09-09 14:05:31 +00:00
Gustavo Sverzut Barbieri a6f46561e7 add missing stddef.h, required by offsetof()
SVN revision: 41327
2009-07-14 15:32:01 +00:00
Vincent Torri 9110d8d574 fix a bit the documentation, but there are still
a lot of doc to write...


SVN revision: 41164
2009-06-22 20:03:58 +00:00
Cedric BAIL c38a387a05 * eina: Patch from Albin Tonnerre that add a new accessor for Inlist container.
SVN revision: 40726
2009-05-18 14:49:57 +00:00
Gustavo Sverzut Barbieri 750bdfce3d inlist: add count.
SVN revision: 39465
2009-03-13 11:32:56 +00:00
Gustavo Sverzut Barbieri 27f001875b Fix EINA_INLIST_GET() macro.
now EINA_INLIST_GET(bla)->next will work, before it was like

 &bla->__in_list->next

which is wrong, since __in_list is not a pointer, rather the memory itself.



SVN revision: 39210
2009-02-25 16:24:00 +00:00
Gustavo Sverzut Barbieri ab95d9183d eina safety checks.
safety checks will report null pointers and other error conditions on
public api's and can be disabled by compile time check.

note that in order to have these checks working we need to make
EINA_ARG_NONNULL() void, otherwise GCC can remove these checks since
they're known to be false.

This commit also make two minor changes:

  * list and hash accessors and iterators are created even for empty
    entities. This is correct in my point of view since NULL should
    indicate error. Having these in were an optimziation, but not
    worth it, these are not the most common case and hitting this path
    is not of much cost.

 * unmarked some parameters as nonnull, mainly on list and inlist.



SVN revision: 38327
2008-12-26 18:31:14 +00:00
Gustavo Sverzut Barbieri b0ee5696a6 eina gets lots of gcc attributes to its api.
this should help with optimizations and code correctness, please see
"info gcc" for detailed explanation on these.

if you experience some functions not working as expected, please
double check if they're not marked with EINA_PURE or EINA_CONST, maybe
I misused them. Remove the macro and try again.

brief explanation:

 * EINA_WARN_UNUSED_RESULT: if you forgot to use the return of some
   function, it will emit a warning (and -Werror will make it an
   error). This way it will be harder to miss the attribution
   "l = eina_list_append(l, v)".

 * EINA_ARG_NONNULL(index, index...): if you give it an explicit NULL
   argument, or some tool (ie: clang) finds it could get a NULL but
   this is not accepted by API, then a warning will be emitted.  This
   will help those that still use eina_hash_add() as if it is
   evas_hash_add().

 * EINA_MALLOC: any non-NULL pointer it returns cannot alias any other
   pointer valid when function returns.

 * EINA_PURE: function have no effects other than the return and this
   return just depend on parameters and/or globals. You might call
   this function in a loop a thousand times and it will return the
   same value, thus you may move this function outside the loop and
   remove it.

 * EINA_CONST: stricter version of EINA_PURE, it will not check for
   global parameters, that is, you cannot consider pointer
   arguments. Use it for math things like "int sqrt(int)".

 * EINA_PRINTF(fmt, arg): will check format parameter specified in
   position "fmt" and passed arguments starting at position "arg", it
   will check for things like giving integers where short or strings
   were expected.

 * EINA_SCANF(fmt, arg): similar to eina_printf().

 * EINA_FORMAT(fmt): for use with things like dgettext(), it will get
   a printf-like format string and modifies it.

Please review and test it with your software, make sure you make clean
before you install the new version so it has any effect.

If you find some functions are missing EINA_WARN_UNUSED_RESULT and
EINA_ARG_NONNULL or others, please add them.



SVN revision: 38323
2008-12-26 13:17:51 +00:00
Gustavo Sverzut Barbieri 6203f4b6be do not segv on NULL inlist.
this was exposed by "make check", counter had no tests and it was failing.



SVN revision: 37957
2008-12-06 06:11:39 +00:00
Gustavo Sverzut Barbieri 72ae858dac fix _GET macros.
SVN revision: 37276
2008-10-28 16:37:32 +00:00
Cedric BAIL 68d377afe6 Rename EINA_INLIST_ITER_NEXT/EINA_INLIST_ITER_LAST to EINA_INLIST_FOREACH/
EINA_INLIST_REVERSE_FOREACH so it best match is behaviour. Asked by Gustavo.



SVN revision: 36928
2008-10-21 12:19:57 +00:00
Cedric BAIL 439401682d Reduce code size, and improve sort speed.
SVN revision: 36382
2008-10-01 16:30:30 +00:00
Cedric BAIL 8bda22fced Add some type checking to Inlined List.
SVN revision: 36084
2008-09-18 14:22:48 +00:00
Cedric BAIL bd76226a8f Expose Iterator/Accessor API for Inlist.
SVN revision: 35447
2008-08-12 16:02:09 +00:00
Cedric BAIL ddaa7d4d8f License changes (BSD -> LGPL)
SVN revision: 35360
2008-08-06 18:15:24 +00:00
Cedric BAIL ff9f4d3502 Cleanup headers.
SVN revision: 35349
2008-08-06 15:41:47 +00:00
Cedric BAIL 5f783f52d8 Add eina inlist tests suite, remove dead code and cleanup iterator.
SVN revision: 35302
2008-08-01 15:44:53 +00:00
Cedric BAIL a8aac59e01 Fix namespace.
SVN revision: 35268
2008-07-31 14:58:23 +00:00
Cedric BAIL 86f58ba639 Use only the needed headers per file and remove some warning.
SVN revision: 35253
2008-07-30 13:35:49 +00:00
Cedric BAIL a92e3d6c83 Adding turran work to unify EFL data types and functions.
SVN revision: 35248
2008-07-30 12:46:55 +00:00