Commit Graph

5 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
Carsten Haitzler ddc6ba2c2a uncrustify eina.
SVN revision: 50573
2010-07-28 02:37:05 +00:00
Gustavo Sverzut Barbieri 93b28743c5 remove warnings from tests.
SVN revision: 42359
2009-09-09 01:41:29 +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 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