summaryrefslogtreecommitdiff
path: root/src/lib/eina_rbtree.c
Commit message (Collapse)AuthorAgeFilesLines
* eina: fix warning. Patch by Seo Sanghyeon.Cedric BAIL2012-03-021-2/+2
| | | | SVN revision: 68628
* eina: faster implementation of Eina_Rbtree by Alexandre Becoulet.Cedric BAIL2012-02-271-182/+183
| | | | SVN revision: 68474
* eina: applied eina_array_count_get -> eina_array_count api change.Daniel Juyung Seo2012-01-101-5/+5
| | | | SVN revision: 67021
* doxy -> .hCarsten Haitzler2011-04-071-109/+0
| | | | SVN revision: 58439
* * eina: improve eina_rbtree doc to please discomfitor.Cedric BAIL2010-10-241-5/+40
| | | | SVN revision: 53835
* initial doxy patch for rbtree from vtorriMike Blumenkrantz2010-09-121-0/+12
| | | | | | | CEDRIC WRITE DOCS FOR THIS! SVN revision: 52172
* Fix common misspellingsLucas De Marchi2010-09-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Convert (hopefully) all comparisons to NULLLucas De Marchi2010-08-211-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply badzero.cocci, badnull.coci and badnull2.cocci This should convert all cases where there's a comparison to NULL to simpler forms. This patch applies the following transformations: code before patch ||code after patch =============================================================== return a == NULL; return !a; return a != NULL; return !!a; func(a == NULL); func(!a); func(a != NULL); func(!!a); b = a == NULL; b = !a; b = a != NULL; b = !!a; b = a == NULL ? c : d; b = !a ? c : d; b = a != NULL ? c : d; b = a ? c : d; other cases: a == NULL !a a != NULL a SVN revision: 51487
* * eina: fix structure content to be more futur proof and reduceCedric BAIL2010-08-191-1/+2
| | | | | | | risk of ABI breakage. SVN revision: 51390
* * eina: fix eina array threadsafe version.Cedric BAIL2010-08-111-2/+1
| | | | | | | | Also add iterator and accessor ability to walk threadsafely. Rename EINA_EACH to EINA_EACH_CB to match other callback cast. SVN revision: 51000
* implement threadsafety for arrays, alter all eina internal array usage to ↵Mike Blumenkrantz2010-08-101-2/+3
| | | | | | | | | | | (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
* uncrustify eina.Carsten Haitzler2010-07-281-192/+229
| | | | SVN revision: 50573
* Remove unneeded code with notnull.cocci scriptLucas De Marchi2010-07-141-4/+5
| | | | | | | | | This continues previous commit with more complex places, where it required more than just removing some "ifs". SVN revision: 50242
* warning--Carsten Haitzler2009-10-251-1/+1
| | | | SVN revision: 43258
* * eina: Add explanation around compiler false positiv warning.Cedric BAIL2009-09-141-0/+5
| | | | SVN revision: 42488
* EINA API BREAK: no more individual modules init/shutdown.Gustavo Sverzut Barbieri2009-09-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* * add eina_config.h in all source files. Fix linking with Visual StudioVincent Torri2009-08-281-2/+3
| | | | | | | * move eina_private.h and eina_safety_checks.h just after eina_config.h SVN revision: 42077
* do not check for data, eina_iterator_next/eina_accessor_data_get() does that.Gustavo Sverzut Barbieri2009-08-251-1/+1
| | | | SVN revision: 41984
* New macros, documentation and consistency for iterators and accessors.Gustavo Sverzut Barbieri2009-02-271-2/+67
| | | | | | | | | | | | | 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
* eina safety checks.Gustavo Sverzut Barbieri2008-12-261-2/+9
| | | | | | | | | | | | | | | | | | | | | | | 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
* remove dead stores and reduce some variable scope.Gustavo Sverzut Barbieri2008-12-231-2/+3
| | | | | | | from clang report. SVN revision: 38294
* Fix couple of issues with MAGIC handling.Gustavo Sverzut Barbieri2008-12-061-0/+2
| | | | | | | | | | | | | eina_magic.h MUST include eina_config.h, otherwise it will not consider EINA_MAGIC stuff. Worse than that, some files were including that directly and were considering EINA_MAGIC attribute even if the file that alloc'ed the memory were not! Also add missing EINA_MAGIC_SET() to iterators and accessors. SVN revision: 37960
* minor formattingVincent Torri2008-09-281-1/+0
| | | | SVN revision: 36293
* Add hash and rbtree delete callback, cleanup the code and improve ↵Cedric BAIL2008-09-241-4/+4
| | | | | | | | | | 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
* Add rbtree destructor without tree reorder and use it.Cedric BAIL2008-09-231-0/+10
| | | | SVN revision: 36188
* * add documentation. The tutorial needs to be written, thoughVincent Torri2008-09-151-6/+6
| | | | | | | | * rename eina_arra_count() to eina_array_count_get() and eina_arra_get() to eina_array_data_get() SVN revision: 36003
* Add a context to the callback.Cedric BAIL2008-08-281-5/+5
| | | | SVN revision: 35719
* Inline red black tree lookup.Cedric BAIL2008-08-281-16/+0
| | | | SVN revision: 35716
* Fix rbtree removal. Was a bug due to rotation and parent lost.Cedric BAIL2008-08-281-6/+20
| | | | SVN revision: 35714
* * move standard header files from eina_private.h to source filesVincent Torri2008-08-281-0/+7
| | | | | | | * minor formatting SVN revision: 35705
* Add Red Black tree API. Right now only insertion, lookup and iterator work.Cedric BAIL2008-08-271-0/+444
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