Commit Graph

59 Commits

Author SHA1 Message Date
Cedric BAIL aaae4e223a * eina: eina_array_clean should be inlined from the beginning.
NOTE: to prevent ABI break, I added the old symbol in eina_abi.c.
	So binary/library using eina_array_clean should continue to work
	without any problem.


SVN revision: 55068
2010-11-29 18:32:30 +00:00
Marc Andre Tanner 3966e2e027 eina: fix compilation if safety checks are disabled
A few files include eina_safety_checks.h and then expect that
eina_log.h is also dragged in, however this isn't the case if
the safety checks were disabled at configure stage.

Include eina_log.h explicitly to fix this.

Patch by: Marc Andre Tanner <mat@brain-dump.org>



SVN revision: 52949
2010-10-01 12:18:39 +00:00
Mike Blumenkrantz eb775222a5 variable name changes for accessor functions
patch by vtorry
compile testing frowned upon by andredieb


SVN revision: 52163
2010-09-12 06:49:57 +00:00
Iván Briano 8374dea693 Evil patch from Evil vtorri. Some improvements to Eina docs.
Yup, docs.. truly evil.


SVN revision: 51993
2010-09-08 17:41:05 +00:00
Lucas De Marchi 33dcb37afe Fix common misspellings
The following misspellings were fixed:

asociated->associated
convertion->conversion
exemple->example
existant->existent
immediatly->immediately
isnt->isn't
loosing->losing
memeber->member
occured->occurred
occurence->occurrence
occurences->occurrences
ocurred->occurred
recomended->recommended
sucess->success
teh->the
tiem->time
usefull->useful




SVN revision: 51962
2010-09-08 03:21:16 +00:00
Cedric BAIL e6f9cee051 * eina: fix structure content to be more futur proof and reduce
risk of ABI breakage.


SVN revision: 51390
2010-08-19 12:02:28 +00:00
Vincent Torri 333b64f15e some doc fixes
SVN revision: 51242
2010-08-17 06:58:26 +00:00
Cedric BAIL f75eab161d * eina: remove thread safe data type for now. They will be back !
SVN revision: 51179
2010-08-16 09:32:09 +00:00
Mike Blumenkrantz f973f8c72a add #ifdefs for some threadsafety stuff
cedric SPANK SPANK SPANK!!!


SVN revision: 51105
2010-08-14 03:03:32 +00:00
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
Mike Blumenkrantz 7833796e00 right...this is malloc...
SVN revision: 50963
2010-08-10 12:25:34 +00:00
Mike Blumenkrantz cbf7f7b58a array threadsafing wip, get rid of dumb undefineds from earlier
SVN revision: 50959
2010-08-10 11:57:20 +00:00
Mike Blumenkrantz 56a0bd9396 implement threadsafety for arrays, alter all eina internal array usage to (hopefully) be threadsafe
call eina_threads_init() to enable this if you have pthread rwlock support (posix 2001)
note some function prototypes have lost const on array params to allow locking
WARNING: you should NOT call eina_threads_shutdown unless you are positive that you will not use any arrays which were created while threadsafe mode were enabled, and vice versa.  Failing to adhere to this warning WILL result in either deadlocks or memory leaks.


SVN revision: 50951
2010-08-10 03:26:15 +00:00
Lucas De Marchi 0a4617ae38 FORMATTING
* Remove vim modelines:
 find . -name '*.[chx]' -exec sed -i '/\/\*$/ {N;N;/ \* vim:ts/d}' \{\} \;
 find . -name '*.[chx]' -exec sed -i '/\/[\*\/] *vim:/d' \{\} \;

* Remove leading blank lines:
 find . -name '*.[cxh]' -exec sed -i '/./,$!d'

If you use vim, use this in your .vimrc:
set ts=8 sw=3 sts=8 expandtab cino=>5n-3f0^-2{2(0W1st0



SVN revision: 50816
2010-08-04 16:57:32 +00:00
Carsten Haitzler ddc6ba2c2a uncrustify eina.
SVN revision: 50573
2010-07-28 02:37:05 +00:00
Vincent Torri c76d3cea37 remove useless semicolon
SVN revision: 48015
2010-04-15 06:28:22 +00:00
Cedric BAIL a9a3813966 * eina: Allow compilation with -Wshadow.
Patch from Albin Tonerre.


SVN revision: 45497
2010-01-23 19:53:27 +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
Carsten Haitzler b2228247e1 warning--
SVN revision: 43259
2009-10-25 08:57:41 +00:00
Cedric BAIL d117093a55 * eina: Add explanation around compiler false positiv warning.
SVN revision: 42488
2009-09-14 15:28:55 +00:00
Gustavo Sverzut Barbieri c98bf92366 replace UNLIKELY() with EINA_UNLIKELY()
SVN revision: 42354
2009-09-08 21:42:17 +00:00
Gustavo Sverzut Barbieri 8318f4c1f2 allow amalgamation of files, at least symbols don't clash anymore.
more related to amalgamation later.



SVN revision: 42312
2009-09-07 04:23:05 +00:00
Gustavo Sverzut Barbieri a4bd77905d malloc--: error and magic can take statically defined strings so no
need to strdup them.



SVN revision: 42311
2009-09-07 03:32:22 +00:00
Gustavo Sverzut Barbieri 404e3e09fb API BREAK: eina_magic_string_set() does not change existing strings anymore.
It's pointless to be able to change magic number string after it's
created, so let's avoid walking the existing list and just remove
places where strings were being duplicated (list/array both inited
magic strings for accessor/iterators).

Also an optimization, register using an array and sort it before
searching. Sort will just happen when array was changed, and this is
just done when eina_magic_string_get() is called.




SVN revision: 42310
2009-09-07 02:33:54 +00:00
Gustavo Sverzut Barbieri 205e0fe399 fix macro positioning of '\'
SVN revision: 42302
2009-09-06 22:25:36 +00:00
Gustavo Sverzut Barbieri e4af7c100c EINA API BREAK: no more individual modules init/shutdown.
Being able to indivually initialize individual modules was initially
"good", but at end it's putting complexities on users that would try
to "optimize" by doing just what they used, but in the end most people
would get them wrong, users would have to do lots of code and etc. At
the end it does not worth.

Most module init just register handful errors and log domains, so are
cheap. The exception is mempool users, that would dlopen() stuff, but
people that are concerned (embedded) can just compile those statically
in eina.

Since at the end any real application would use most of modules, we
actually end saving lots of function calls that would do nothing other
than increment a global counter.

I also did the init/shutdown use an array, making it easier to
maintain. The inital dependencies were analysed by a script I wrote, I
hope it's all right.

Please fix any breakages you find!



SVN revision: 42300
2009-09-06 22:21:56 +00:00
Gustavo Sverzut Barbieri 4d5fbb7742 loggify array.
this is the last eina module to be converted to eina_log! :-)


SVN revision: 42228
2009-09-04 02:35:24 +00:00
Gustavo Sverzut Barbieri 07d2bde900 eina_safety_checks_init()
All these individual init functions are getting messy, some modules
lack them and it's easy to get inconsistent. Safety check needs error
and log, but these need safety checks as well, some modules (lalloc,
rbtree and others) use safety checks but provide no _init().

I want to know if we really gain something to init individual
modules. It should not be that expensive as init should not allocate
heavy resources and the recommendation is to call eina_init() so most
users will do that anyway.

If people agree I'll unmark all *_init() as EAPI and make them private
to eina lib.



SVN revision: 42214
2009-09-04 00:53:19 +00:00
Vincent Torri 72b87160a2 * add eina_config.h in all source files. Fix linking with Visual Studio
* move eina_private.h and eina_safety_checks.h just after eina_config.h


SVN revision: 42077
2009-08-28 12:03:34 +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 33cfc873ec Fix init error handling of array, benchmark, counter,main,
rectangle and stringshare modules. Patch by Andre Dieb, modified
by me (formatting and fix for the Windows code in eina_counter)


SVN revision: 40915
2009-06-06 04:22:21 +00:00
Vincent Torri 309606b2dd use variadic macros, as suggested by Gustavo
SVN revision: 39663
2009-03-24 07:10:46 +00:00
Vincent Torri 7e809db9c8 fix some llvm report
SVN revision: 39657
2009-03-23 20:36:10 +00:00
Cedric BAIL 2cad4f8082 * eina/src/lib/eina_array.c: Fix small typo.
SVN revision: 38921
2009-02-03 13:20:30 +00:00
Vincent Torri cda565a38e * more doc in the tutorial of the array data type
* minor formatting


SVN revision: 38853
2009-01-29 23:16:23 +00:00
Vincent Torri c166854ae1 * minor formatting
* add some doc in eina_array
 * in eina_main.c, include only the necessary headers
 * fix some warnings (size_t <-> int)


SVN revision: 38740
2009-01-23 16:11:45 +00:00
Cedric BAIL f0096a167c * eina/src/include/eina_private.h: better use do {} while(0);
* eina/src/lib/eina_array.c: Use gcc attribute to shutdown llvm warning.


SVN revision: 38666
2009-01-20 16:47:19 +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
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
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
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
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 54de28cc68 * add doc for counter and convert modules
* minor spelling, formatting and doxygen fixes


SVN revision: 36057
2008-09-17 18:55:54 +00:00
Vincent Torri 78c9527052 * add documentation. The tutorial needs to be written, though
* rename eina_arra_count() to eina_array_count_get() and
   eina_arra_get() to eina_array_data_get()


SVN revision: 36003
2008-09-15 19:17:15 +00:00
Cedric BAIL c52f7b7b62 Make inline only usefull function.
Return information about potential error during eina_array_remove.



SVN revision: 35888
2008-09-08 12:19:15 +00:00
Vincent Torri b73180cd01 * add array doc
* eina_array_push() returns now a bool
 * fix compilation


SVN revision: 35871
2008-09-07 19:12:49 +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 e360e1b2b9 Cleanup.
SVN revision: 35446
2008-08-12 16:01:10 +00:00