Commit Graph

13 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 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
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
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
Vincent Torri 8c14ca031e minor fixes
SVN revision: 44720
2009-12-25 16:22:13 +00:00
Gustavo Sverzut Barbieri 5b68d0be34 minor fixes.
SVN revision: 42504
2009-09-15 22:32:24 +00:00
Vincent Torri 9b9c496175 move the declaration of variables at the beginning of the block
SVN revision: 42499
2009-09-15 21:20:08 +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 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 eef2d35ea6 eina_matrixsparse: loggify, install header, remove warnings and coding style.
* use eina_log
 * install eina_matrixsparse.h
 * remove unused variable
 * fix coding style issue reported by Vincent



SVN revision: 42246
2009-09-04 14:18:05 +00:00
Gustavo Sverzut Barbieri 643958705b eina_matrixsparse: welcome sparse matrix implementation and tests.
Sparse Matrix was implemented and tested by Rafael Antognolli and
myself in order to implement optimized large sparse matrix walk in
some products, one of them WebKit-EFL optimizations.

We have done extensive tests, with good code coverage. Similar to
lists/inlists, we keep pointer to last known element and similar to
iterators we keep reference to last accessed row and cell inside
rows. This allows fast sequential access (for i... for j... m[i,j]),
that is our most common usage case.

Rows are kept in a list, with cells inside that row as another
list. It's not similar to most book implementations where cells keep
reference to their sibling cells in other rows as well, we opted to
not do that to save some pointers and make algorithms simpler, still
do great for our use case.

This code was developed on behalf of our client, that wants to remain
unnamed so far. Thanks client ;-)



SVN revision: 42243
2009-09-04 13:43:44 +00:00