Commit Graph

20 Commits

Author SHA1 Message Date
Carsten Haitzler ca4fa3936a doxy -> .h
SVN revision: 58439
2011-04-07 13:00:10 +00:00
Cedric BAIL 3a058ac014 * eina: revert and fix a typo that make stuff even faster.
SVN revision: 56712
2011-02-04 14:03:18 +00:00
Tom Hacohen f2afb18e00 Eina: reverted commit 56637 (scalability and whatever improvements) it had HUGE leaks.
SVN revision: 56695
2011-02-03 20:04:03 +00:00
Cedric BAIL b409910a2a * eina: improve speed and scalability a lot.
SVN revision: 56637
2011-02-01 18:10:03 +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
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 ddc6ba2c2a uncrustify eina.
SVN revision: 50573
2010-07-28 02:37:05 +00:00
Gustavo Sverzut Barbieri 90c5c1daaa doc improvements.
SVN revision: 46670
2010-02-28 21:29:30 +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
Cedric BAIL 5257321d9a Fix some constness.
SVN revision: 37576
2008-11-10 16:23:56 +00:00
Gustavo Sverzut Barbieri 72ae858dac fix _GET macros.
SVN revision: 37276
2008-10-28 16:37:32 +00:00
Cedric BAIL 8b33d245e6 Inlined functions require NULL, so including stdlib.h is required.
SVN revision: 36266
2008-09-26 15:26:36 +00:00
Cedric BAIL 550ebc9ab1 Add hash and rbtree delete callback, cleanup the code and improve performance (hash as a new internal structure).
We still need a hash function for removing a node from the hash and destroying it at the same time.



SVN revision: 36222
2008-09-24 17:14:29 +00:00
Cedric BAIL bf418729d2 Group all rbtree functions.
SVN revision: 36209
2008-09-24 12:58:31 +00:00
Cedric BAIL 8acad8a50e Add rbtree destructor without tree reorder and use it.
SVN revision: 36188
2008-09-23 16:07:48 +00:00
Cedric BAIL 3fc07d2aac Add helper for inlined red black tree manipulation.
SVN revision: 36164
2008-09-22 13:02:08 +00:00
Cedric BAIL 3e562ccfc2 Add a context to the callback.
SVN revision: 35719
2008-08-28 16:33:40 +00:00
Cedric BAIL 9494785cb7 Inline red black tree lookup.
SVN revision: 35716
2008-08-28 14:37:26 +00:00
Cedric BAIL 394c787dde Add Red Black tree API. Right now only insertion, lookup and iterator work.
The current implementation choose to move the node allocation outside of eina
control like eina_inlist. They currently have the same memory footprint as
eina_inlist and the implementation of insertion and lookup are iterative
making it quite fast. This should make them a good competitor of eina_inlist
for eina_hash and eina_stringshare.



SVN revision: 35689
2008-08-27 10:07:12 +00:00