Commit Graph

23 Commits

Author SHA1 Message Date
Cedric BAIL a6645cb746 * eina: fix eina array threadsafe version.
Also add iterator and accessor ability to walk threadsafely.
	Rename EINA_EACH to EINA_EACH_CB to match other callback cast.


SVN revision: 51000
2010-08-11 14:32:30 +00:00
Carsten Haitzler ddc6ba2c2a uncrustify eina.
SVN revision: 50573
2010-07-28 02:37:05 +00:00
Gustavo Sverzut Barbieri e3c9d3f62a TRUE/FALSE are gone, use EINA_TRUE/EINA_FALSE instead.
SVN revision: 46500
2010-02-26 00:59:11 +00:00
Sebastian Dransfeld a1270e5796 Remove unused defines
SORT_MIN and SORT_MAX are not used in eina, and will result in errors if
used. eina_list_sort(list, EINA_SORT_MAX, ...) will not give the
expexted result.

SVN revision: 45222
2010-01-16 13:54:38 +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
Gustavo Sverzut Barbieri 86aa8a433b mark log functions as not_instrument_function.
SVN revision: 42270
2009-09-04 21:55:03 +00:00
Cedric BAIL 2ba87c1129 * eina: Fix SunPro compiler.
SVN revision: 41690
2009-08-11 14:14:42 +00:00
Vincent Torri c94a92a174 * Remove the use of HAVE___ATTRIBUTE__ (which is defined at
configure time) in an exported header. Use only macros
   defined by the compilers, which is sufficient and simpler.
 * Add missing EINA_DEPRECATED in some cases.


SVN revision: 41199
2009-06-25 19:58:05 +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
Vincent Torri 5bd14d2a05 * modify the way eina_config.h is built (see eina_config.h.in
and configure.ac)
 * include eina_config.h explicitely in files where the macros
   of eina_config.h are used
 * define eina_magic_string_init()  and eina_magic_string_shutdown()
   even when the mugle option is set (magic disabled)
 * formatting and fix in configure.ac


SVN revision: 40962
2009-06-08 08:27:33 +00:00
Gustavo Sverzut Barbieri 124e0c4a1b deprecated attribute
SVN revision: 39597
2009-03-20 01:00:35 +00:00
Jorge Luis Zapata Muga 40d9cab09a + Fix some english typos
+ Fix some macros that need an expression and there are no attributes support, just pass the expression as is

SVN revision: 38792
2009-01-26 16:23:07 +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 3d41b74146 Update ac_attribute macro and remove __UNUSED__ declaration from eina.
SVN revision: 38179
2008-12-17 13:03:00 +00:00
Carsten Haitzler 7d0d0aaf7f handle some bizarre build issues...
SVN revision: 37048
2008-10-24 10:57:00 +00:00
Gustavo Sverzut Barbieri 93a280b7d7 eina_bool is now an unsigned char.
This makes clear what size and if we have a signal or not in our type,
so no compilers have the right to choose different for us (like they
do with enum).

Also fixes compile of C++ programs with eina_rectangle.h, that
contains some inline code, the expression evaluates a boolean
expression and compiler does not know how to convert that to old
Eina_Bool.



SVN revision: 36939
2008-10-21 15:21:37 +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
Vincent Torri dafd079639 * move standard header files from eina_private.h to source files
* minor formatting


SVN revision: 35705
2008-08-28 07:46:42 +00:00
Cedric BAIL ea0fb7d1b5 Cleanup.
SVN revision: 35437
2008-08-11 16:21:51 +00:00
Cedric BAIL ddaa7d4d8f License changes (BSD -> LGPL)
SVN revision: 35360
2008-08-06 18:15:24 +00:00
Cedric BAIL 7473953e3e Add the __UNUSED__ macro.
SVN revision: 35269
2008-07-31 14:59:23 +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