Commit Graph

406 Commits

Author SHA1 Message Date
Cedric BAIL 8a380803a7 * eina/src/include/eina_private.h,
* eina/src/lib/eina_array.c: Remove potential error detected by llvm in eina_array.


SVN revision: 38662
2009-01-20 15:44:52 +00:00
Cedric BAIL 57aadc71fd Remove warning.
SVN revision: 38661
2009-01-20 15:42:34 +00:00
Cedric BAIL 3c2f745ab9 Fix wrong order and useless double include.
SVN revision: 38660
2009-01-20 15:40:36 +00:00
Vincent Torri 0d166092ac * fix warning (missing alloca declaration)
* formatting


SVN revision: 38657
2009-01-20 08:29:41 +00:00
tilman 4c70375594 Fixed two trivial const correctness issues.
SVN revision: 38621
2009-01-17 17:13:03 +00:00
Vincent Torri ca0cbdbec7 update ac_attribute.m4
SVN revision: 38579
2009-01-14 08:36:16 +00:00
Vincent Torri cc7b4554cb The problem of the detection of __attribute__ on mac os x comes
from the fact that we put a definition of a function in the
body of main(). Moving it outside fixes it. In addition, the
extra flag i added in configure.ac is useless.


SVN revision: 38565
2009-01-13 06:19:47 +00:00
Vincent Torri f84454ed08 mac os x port of gcc has problems with __attribute__ and thinks that
there are nested functions. -fnested-functions must be passed to the
compiler to allow the compilation on that platform.



SVN revision: 38544
2009-01-11 09:25:47 +00:00
Daniel Kolesa b61dff0b58 Added debian/rules files with a new permissions set(755).
SVN revision: 38519
2009-01-09 16:33:51 +00:00
Daniel Kolesa 971b1682a9 prepare debian rules files for new chmod permissions.
SVN revision: 38518
2009-01-09 16:31:51 +00:00
Daniel Kolesa 2bf1434120 Added new set of debian subdirs.
BROKEN/etox 
e 
ecore 
e_dbus 
edje 
edje_editor 
edje_viewer 
eet 
efreet 
eina 
elicit 
elitaire 
embryo 
E-MODULES-EXTRA 
emotion 
emphasis 
empower 
emprint 
enhance 
enity 
entrance 
ephoto 
epsilon 
esmart 
estickies 
etk 
etk_extra 
evas 
evolve 
ewl 
exhibit 
exml 
expedite 
imlib2 
imlib2_loaders 
MISC/engage 
OLD/eclair 
OLD/engrave 
OLD/enotes 
OLD/entrance_edit_gui 
OLD/e_utils 
OLD/evoak 
OLD/examine 
OLD/iconbar 
PROTO/etk_server 
PROTO/exchange 
PROTO/extrackt 
rage


SVN revision: 38399
2009-01-01 11:35:17 +00:00
Daniel Kolesa bf77c1ced2 Removed debian subfolders - prepared for a new set of debian subdirs.
SVN revision: 38398
2009-01-01 11:25:05 +00:00
Carsten Haitzler 430fa42aa4 naruto takahashi's fix for gcc3 patch
SVN revision: 38397
2009-01-01 03:09:48 +00:00
handyande c2bab4e388 Make eina compile on OSX
SVN revision: 38382
2008-12-31 11:51:37 +00:00
Iván Briano 025c3d8422 Let's see if the number of people asking what Eina is remains the same.
SVN revision: 38354
2008-12-30 15:38:11 +00:00
Cedric BAIL f2037c5c6f Don't generate warning in some little case.
SVN revision: 38348
2008-12-29 12:41:46 +00:00
Cedric BAIL f722173009 Don't display useless warning.
SVN revision: 38346
2008-12-29 11:49:35 +00:00
Cedric BAIL 73c686a5ea Fix a little mistake.
SVN revision: 38339
2008-12-29 08:53:19 +00:00
Cedric BAIL e537976f58 Use correct type.
SVN revision: 38338
2008-12-29 08:53:01 +00:00
Gustavo Sverzut Barbieri b6e27a739f oops, it's EINA_SAFETY_CHECKS, not just SAFETY_CHECKS.
SVN revision: 38328
2008-12-26 19:14:57 +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 de8b6a7bbd fix possible errors with pointer/offset calculation.
it works on gcc, but maybe it would break in other compilers, so make
it safe.



SVN revision: 38302
2008-12-23 20:05:44 +00:00
Gustavo Sverzut Barbieri 7eb0826e29 remove dead stores and reduce some variable scope.
from clang report.


SVN revision: 38294
2008-12-23 19:17:55 +00:00
Cedric BAIL fb238897e5 Use float instead of double.
SVN revision: 38292
2008-12-23 17:23:35 +00:00
Cedric BAIL e006567cb0 Make it compile on Solaris.
SVN revision: 38290
2008-12-23 13:33:11 +00:00
Cedric BAIL 2c9ac0bd82 Remove now uneeded header.
SVN revision: 38289
2008-12-23 13:23:10 +00:00
Cedric BAIL 889d40abf8 Remove PATH_MAX use.
SVN revision: 38288
2008-12-23 13:12:06 +00:00
Cedric BAIL 6a87ca7590 Make code understandable by Visual Studio.
SVN revision: 38287
2008-12-23 10:04:46 +00:00
Cedric BAIL c8714d04cc Declaration should be done before any code.
SVN revision: 38286
2008-12-23 10:02:27 +00:00
dm 77dedbca06 Eina Win32 VS8 project added
SVN revision: 38282
2008-12-22 23:20:52 +00:00
Gustavo Sverzut Barbieri 765b770f82 oops, eina_stringshare_strlen() should never account '\0'.
SVN revision: 38260
2008-12-21 06:45:09 +00:00
Cedric BAIL 5383cabf2b Fix EINA_ARRAY_ITER_NEXT off by one bug. With this fix you can no longer push
NULL pointer inside an array.


SVN revision: 38232
2008-12-19 17:55:57 +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
Cedric BAIL c80a55ee14 Add small bucket support.
SVN revision: 38168
2008-12-16 16:49:29 +00:00
Cedric BAIL 00b5758937 Add include to remove warning.
SVN revision: 38167
2008-12-16 16:49:00 +00:00
Cedric BAIL db11d16b7f Manipulating NULL iterator should be concidered as a defined behaviour as it
give the possibility to write small code like :

it = eina_hash_iterator_tuple_new(hash);
eina_iterator_foreach(it, do_something_cb, NULL);
eina_iterator_free(it);

If hash is empty, but valid it will return a NULL iterator for this
example.


SVN revision: 38104
2008-12-11 13:54:59 +00:00
Cedric BAIL b8d721ac05 If we set the data free callback of a hash, we expect it to be called when
calling all eina_hash_del functions.


SVN revision: 38102
2008-12-11 13:47:58 +00:00
Cedric BAIL 9b9f752379 Only allocate hash bucket when needed.
Make eina_hash_del_by_key really different from eina_hash_del.


SVN revision: 38064
2008-12-09 17:39:48 +00:00
Cedric BAIL 00e8fba9ba All eina_hash_find* functions should not report problem when hash or key is NULL.
SVN revision: 38059
2008-12-09 14:59:30 +00:00
Cedric BAIL 8ee267ec0d Remove uneeded included.
SVN revision: 38058
2008-12-09 14:30:54 +00:00
Cedric BAIL b0e1863871 eina_hash_find should not complain when hash or key is NULL.
SVN revision: 38057
2008-12-09 14:24:08 +00:00
Cedric BAIL 68cfd7839f Add a visual feedback to counte test.
SVN revision: 38056
2008-12-09 13:58:04 +00:00
Cedric BAIL 24c1995b68 Change eina_counter_dump to return a string so it could work easily on windows.
SVN revision: 38055
2008-12-09 13:55:10 +00:00
Cedric BAIL af30207725 eina_hash_del must honor the data parameter when the key is passed. Propagate
it correctly.


SVN revision: 38054
2008-12-09 13:52:09 +00:00
Cedric BAIL 273b7422d6 It's cleaner to first include private header as they could define macro
differently than public interface.


SVN revision: 38050
2008-12-09 13:06:17 +00:00
Cedric BAIL d19801f7c2 Prevent warning from Eina Magic when hash population is 0.
SVN revision: 38049
2008-12-09 13:05:33 +00:00
Cedric BAIL 55d9c97446 __UNUSED__ macro is not exported by eina.
SVN revision: 38045
2008-12-09 11:01:12 +00:00
Cedric BAIL 5358b1f84f Add integer and pointer hash table helper.
SVN revision: 38026
2008-12-08 17:31:55 +00:00
Cedric BAIL c7b0e0a6b3 Fix include related to previous Eina Magic patch.
SVN revision: 38017
2008-12-08 10:51:51 +00:00