Commit Graph

16 Commits

Author SHA1 Message Date
Lucas De Marchi 5a8a8c9014 Convert (hopefully) all comparisons to NULL
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
2010-08-21 13:52:25 +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 689a24559c add threadsafety for hashes
SVN revision: 51106
2010-08-14 03:05:35 +00:00
Carsten Haitzler ddc6ba2c2a uncrustify eina.
SVN revision: 50573
2010-07-28 02:37:05 +00:00
Cedric BAIL 5049832c3a * eina: Add more tests.
SVN revision: 45326
2010-01-19 13:51:53 +00:00
Cedric BAIL 1d0efd8c18 * eina: Add more test. eina_tiler and eina_rectangle need some more.
SVN revision: 44176
2009-12-03 18:17:37 +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
Vincent Torri e88e4d5fb5 * fix warning in tests
* add config.h when needed
 * remove result/ dir before launching benchmark


SVN revision: 36321
2008-09-29 19:20:16 +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
Cedric BAIL 80a227ff13 We have now a defined behaviour when we have more than one entry with the same
key in the hash table.


SVN revision: 36096
2008-09-19 12:19:06 +00:00
Cedric BAIL 7da98019b3 Remove warning.
SVN revision: 35813
2008-09-03 14:38:49 +00:00
Cedric BAIL 84bcc585cd Always use eina when possible.
SVN revision: 35738
2008-08-29 16:06:14 +00:00
Cedric BAIL 43cc2dca6f Add first try for an accessor and iterator API, comment welcome (lack inlist and list currently).
Rewrite EINA_ARRAY_ITER_NEXT, still fast, need one more parameter, but no more EINA_ARRAY_ITER_END.


SVN revision: 35438
2008-08-11 16:30:16 +00:00
Cedric BAIL d87d5d949a Cover all case of the hash function.
SVN revision: 35409
2008-08-08 15:54:26 +00:00
Cedric BAIL ddaa7d4d8f License changes (BSD -> LGPL)
SVN revision: 35360
2008-08-06 18:15:24 +00:00
Cedric BAIL 69945bf4ec Major cleanup. Eina_Hash now support other key than string. All code except
allocation failure and foreach is covered by the test.


SVN revision: 35351
2008-08-06 15:46:57 +00:00