Commit Graph

33 Commits

Author SHA1 Message Date
Gustavo Sverzut Barbieri 56d1e979ce fix docs and add clone and reversed iterator calls.
* docs: be clear if it's a copy or in-place.

 * clone: add some apis to create a copy while operates, sort should
   do the same.

 * reversed iterator: new call to walk the list reversed, will make
   life easier in some cases.



SVN revision: 39515
2009-03-17 12:52:38 +00:00
Gustavo Sverzut Barbieri e3cce7b79d New macros, documentation and consistency for iterators and accessors.
EINA_ITERATOR_FOREACH() and EINA_ACCESSOR_FOREACH() are new macros to
help us forget about nasty C details (like cast to (void **)).

Document most iterators and accessors.

All iterators now set EINA_ERROR_OUT_OF_MEMORY if it's the case.



SVN revision: 39267
2009-02-27 16:32:22 +00:00
Cedric BAIL e31b5e961e * eina/src/lib/eina_list.c: Use less code.
* eina/src/lib/eina_error.c: Add a way to abord on any error message.



SVN revision: 39196
2009-02-25 10:46:14 +00:00
Cedric BAIL 1caa0562ad Add new set of usefull fonctions for eina list.
SVN revision: 38791
2009-01-26 14:46:02 +00:00
Cedric BAIL 0dda30daf6 * eina/src/include/eina_array.h,
* eina/src/include/eina_f16p16.h,
	* eina/src/include/eina_accessor.h,
	* eina/src/include/eina_list.h,
	* eina/src/include/eina_iterator.h,
	* eina/src/lib/eina_rectangle.c,
	* eina/src/lib/eina_list.c,
	* eina/src/lib/eina_array.c,
	* eina/src/lib/eina_hash.c,
	* eina/src/lib/eina_module.c,
	* eina/src/lib/eina_stringshare.c,
	* eina/src/lib/eina_benchmark.c: Fix for windows compilation.



SVN revision: 38663
2009-01-20 15:56:48 +00:00
tilman 4c70375594 Fixed two trivial const correctness issues.
SVN revision: 38621
2009-01-17 17:13:03 +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 09924b54e5 Let valgrind help with EINA_MAGIC.
Keep EINA_MAGIC at the end of the structure (WHEN POSSIBLE! Watch out
flexible arrays like char str[] at the end!)

this way if parts use EINA_MAGIC and others do not, it will possible overflow and valgrind can help us.

WARNING: make uninstall before update! Then make clean and make install, check if everything is working with "make check".



SVN revision: 37961
2008-12-06 06:53:14 +00:00
Carsten Haitzler 84f8c174bf fix list accounting on sort! bad - how did this hide for so long?
SVN revision: 37951
2008-12-06 02:51:04 +00:00
Carsten Haitzler 9f157c260c error macro.
SVN revision: 37323
2008-10-29 23:41:55 +00:00
Carsten Haitzler b4f33c6358 add error catching and output if mempool alloc/init fails.
SVN revision: 37321
2008-10-29 23:12:56 +00:00
Davide Andreoli eacf00b6d7 small doxy fix
SVN revision: 37037
2008-10-24 00:37:09 +00:00
Cedric BAIL 430fb672cd Rename EINA_LIST_ITER_NEXT to EINA_LIST_FOREACH.
SVN revision: 36930
2008-10-21 12:49:29 +00:00
Cedric BAIL 1950725606 Add merge function to list data type.
SVN revision: 36922
2008-10-21 11:28:38 +00:00
Vincent Torri 84dcc24d09 Fix compilation and warnings on Windows:
* include Evil.h for getenv on mingw32ce
 * include config.h in benchmark.c so that EAPI is correctly defined
 * minor fixes in configure.ac


SVN revision: 36729
2008-10-16 21:31:51 +00:00
Cedric BAIL 195b2da188 Give more choice to eina_list mempool.
SVN revision: 36479
2008-10-06 14:47:09 +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 a44f814dd2 Using mempool improve cache locality and speed list manipulation like sort.
SVN revision: 36363
2008-09-30 16:48:28 +00:00
Cedric BAIL 9ffada517d Faster sort initialisation.
SVN revision: 36359
2008-09-30 14:16:18 +00:00
Cedric BAIL a466b34ea0 Faster sort from Alexandre Becoulet integrated by quarium inside eina.
SVN revision: 36265
2008-09-26 13:45:30 +00:00
Cedric BAIL 8b85ce70d4 Patch from quarium.
Add magic to array and list.

Need to patch autotools to generate something like eina_config.h.



SVN revision: 36256
2008-09-25 14:46:16 +00:00
Cedric BAIL e8b25fb405 Add a sort benchmark.
SVN revision: 36250
2008-09-25 12:41:49 +00:00
Vincent Torri 4313d2b084 * fix list doc
* minor other doc fixes
 * link the mempool modules statically to libeina when requested
 * don't compile static lib of mempool when they are built as shared lib


SVN revision: 36178
2008-09-23 05:17:49 +00:00
Vincent Torri f50feadeae * add benchmark and file documentation
* reorganize a bit more. it's not finished
 * fix spellingg and formatting 
 * gnuplot file names generated by our bechmarks tests have an
   absolute time description and not H:M:S description, as this
   breaks the check out of the repo on Windows.


SVN revision: 36090
2008-09-19 05:22:43 +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
Vincent Torri 4336fb3658 forget to open groups in doc...
SVN revision: 35703
2008-08-28 06:34:20 +00:00
Vincent Torri 4485f06f66 fix a bit list documentation. Not finished yet.
SVN revision: 35702
2008-08-28 06:31:18 +00:00
Cedric BAIL 911cd4deda Add iterator/accessor to eina list.
Change list size type to unsigned int.


SVN revision: 35454
2008-08-13 09:19:34 +00:00
Cedric BAIL ce23f3c2a9 After benchmarking, providing inline does impact performance of list and array user.
SVN revision: 35406
2008-08-08 14:20:11 +00:00
Cedric BAIL f193096aa8 Add eina_list test suite. Cleanup list implementation and share out of memory error.
SVN revision: 35378
2008-08-07 13:09:09 +00:00
Cedric BAIL ddaa7d4d8f License changes (BSD -> LGPL)
SVN revision: 35360
2008-08-06 18:15:24 +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