Gustavo Sverzut Barbieri
4eb71900a2
and rename static linkage as well.
...
SVN revision: 41131
2009-06-20 16:31:15 +00:00
Vincent Torri
ddee121285
i forgot to rename file...
...
SVN revision: 41126
2009-06-20 10:17:37 +00:00
Vincent Torri
8021f6beeb
formatting
...
SVN revision: 41120
2009-06-20 06:47:03 +00:00
Vincent Torri
8909bb6b69
* All memory pools can be enabled / disabled
...
* Allow to pass 'static' to configure memory pools
* Add fixed_bitmap in the possible statically linked memory pools
For example:
./configure --enable-chained-pool=static --disable-fixed-bitmap
SVN revision: 41119
2009-06-20 06:42:32 +00:00
Cedric BAIL
7a18ab5ebc
* eina: Add an eina_hash_stringshare_new.
...
SVN revision: 41112
2009-06-19 14:44:23 +00:00
Cedric BAIL
bba26ef811
* eina: Improve eina hash manipulation for int.
...
- Faster int key comparison.
- Key Length callback could now be NULL and 0 will be assumed.
SVN revision: 41100
2009-06-18 12:08:52 +00:00
Lars Munch
7bcbe02a3e
Use correct module extension on cygwin
...
Patch from: booleanlabel at gmail dot com. Thanks.
SVN revision: 41094
2009-06-18 04:06:34 +00:00
Gustavo Sverzut Barbieri
32ff1f0aa4
better error setting and reporting in module loading.
...
* just set error codes if we know the error.
* debug dlopen() error using EINA_ERROR_PDBG()
SVN revision: 41057
2009-06-16 14:59:09 +00:00
Vincent Torri
320619b866
Remove trailing slash in the installation directory
...
Fix installation of the eina modules with automake 1.11
SVN revision: 41013
2009-06-12 07:35:53 +00:00
Cedric BAIL
35526933af
* eina: Remove memory leak (patch from Andre Dieb).
...
SVN revision: 40986
2009-06-09 16:02:20 +00:00
Vincent Torri
5bd14d2a05
* modify the way eina_config.h is built (see eina_config.h.in
...
and configure.ac)
* include eina_config.h explicitely in files where the macros
of eina_config.h are used
* define eina_magic_string_init() and eina_magic_string_shutdown()
even when the mugle option is set (magic disabled)
* formatting and fix in configure.ac
SVN revision: 40962
2009-06-08 08:27:33 +00:00
Gustavo Sverzut Barbieri
df58840124
do not leak module if user do not want it.
...
SVN revision: 40924
2009-06-06 22:53:03 +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
46836c875f
fix documentation
...
SVN revision: 40914
2009-06-06 03:55:32 +00:00
Cedric BAIL
5aeb9bbe82
* Fix some init/shutdown procedure.
...
SVN revision: 40892
2009-06-04 09:02:29 +00:00
Cedric BAIL
c38a387a05
* eina: Patch from Albin Tonnerre that add a new accessor for Inlist container.
...
SVN revision: 40726
2009-05-18 14:49:57 +00:00
Gustavo Sverzut Barbieri
ebeabe3735
enable adding just part of a string.
...
this allows us to add stringshare from a larger buffer that cannot be
modified.
SVN revision: 40516
2009-05-06 04:11:01 +00:00
Vincent Torri
045986b465
fix rectangle unit test
...
SVN revision: 40158
2009-04-18 09:17:37 +00:00
Carsten Haitzler
ce5a59b7e5
lutin... release soname patch. verbose svn soname used right now
...
SVN revision: 40131
2009-04-17 10:01:45 +00:00
Viktor Kojouharov
b2eeca9783
fix docu
...
SVN revision: 39989
2009-04-11 16:59:39 +00:00
Cedric BAIL
5016004597
* eina_rectangle: Use a mempool to reduce memory allocation.
...
SVN revision: 39909
2009-04-09 15:51:32 +00:00
Carsten Haitzler
1c00a019e9
new -> news. people with g++ using eina in their c++ stuff will be most
...
un-amused by the use of a variable called "new".
SVN revision: 39905
2009-04-09 05:55:51 +00:00
Gustavo Sverzut Barbieri
2e9a9a9700
eina_stringshare_replace() gets in!
...
I was replicating this code in many places, it should go into eina itself.
It's the right way to change strings that you don't know are
stringshared before, since it will first add a reference and then
remove, making it impossible to have references to go 0 and string
being released before adding new references, fixing the following
possible problem:
x = eina_stringshare_add("x");
replace(x, x);
then:
incorrect_replace(const char **b, const char *a) {
eina_stringshare_del(*b); /* reference gets to 0 */
eina_stringshare_add(a); /* BUG!!! */
*b = a;
}
SVN revision: 39903
2009-04-08 18:25:02 +00:00
Gustavo Sverzut Barbieri
78f4f011d0
export vargs version of eina_error_print().
...
SVN revision: 39879
2009-04-06 12:41:50 +00:00
Vincent Torri
46b3ef7d0c
Fix llvm report in eain_tiler.
...
The remaining llvm reports, in eina_rbtree.c, are not correct, I think.
SVN revision: 39710
2009-03-25 12:04:21 +00:00
Vincent Torri
18258b5721
fix llvm report in eina_stringshare
...
SVN revision: 39707
2009-03-25 10:32:33 +00:00
Vincent Torri
bda0cab9dd
fix llvm reports in eina_list
...
SVN revision: 39706
2009-03-25 09:24:56 +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
Vincent Torri
2b1fe0c3b9
change the variable near to lnear, as it seems
...
that it's a keyword on Windows...
SVN revision: 39621
2009-03-22 12:22:39 +00:00
Gustavo Sverzut Barbieri
124e0c4a1b
deprecated attribute
...
SVN revision: 39597
2009-03-20 01:00:35 +00:00
Gustavo Sverzut Barbieri
21f6be2f66
constness++
...
SVN revision: 39596
2009-03-20 01:00:04 +00:00
Cedric BAIL
e027bb8a6e
* eina_list: Add a eina_list_search_sorted_near_list. Usefull if you want to build
...
a sorted list.
SVN revision: 39550
2009-03-18 15:00:52 +00:00
Cedric BAIL
9fab9595b5
* eina_list: Add eina_list_search_sorted_list and eina_list_search_unsorted_list.
...
SVN revision: 39546
2009-03-18 13:29:36 +00:00
Gustavo Sverzut Barbieri
bd6ef0cce1
add missing prototype.
...
SVN revision: 39516
2009-03-17 13:05:02 +00:00
Gustavo Sverzut Barbieri
56d1e979ce
fix docs and add clone and reversed iterator calls.
...
* docs: be clear if it's a copy or in-place.
* clone: add some apis to create a copy while operates, sort should
do the same.
* reversed iterator: new call to walk the list reversed, will make
life easier in some cases.
SVN revision: 39515
2009-03-17 12:52:38 +00:00
Gustavo Sverzut Barbieri
750bdfce3d
inlist: add count.
...
SVN revision: 39465
2009-03-13 11:32:56 +00:00
Carsten Haitzler
739db97356
1. cygwin fixes from booleanlabel@gmail.com
...
2. these are just generic fixes - so also fix 1 doc example too.
SVN revision: 39464
2009-03-13 10:53:07 +00:00
Carsten Haitzler
691aa040b9
strict-aliasing is gcc 3+ - apply to CFLAGS for libeina.
...
SVN revision: 39462
2009-03-13 10:24:45 +00:00
Jorge Luis Zapata Muga
07235befaa
+ Fix the precision when multiplying two fixed point numbers
...
SVN revision: 39307
2009-03-01 12:35:30 +00:00
Gustavo Sverzut Barbieri
e3cce7b79d
New macros, documentation and consistency for iterators and accessors.
...
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
2009-02-27 16:32:22 +00:00
Gustavo Sverzut Barbieri
aff2f5ebcf
Add reverse iterator macros for eina list.
...
SVN revision: 39218
2009-02-25 20:19:32 +00:00
Gustavo Sverzut Barbieri
27f001875b
Fix EINA_INLIST_GET() macro.
...
now EINA_INLIST_GET(bla)->next will work, before it was like
&bla->__in_list->next
which is wrong, since __in_list is not a pointer, rather the memory itself.
SVN revision: 39210
2009-02-25 16:24:00 +00:00
Cedric BAIL
e31b5e961e
* eina/src/lib/eina_list.c: Use less code.
...
* eina/src/lib/eina_error.c: Add a way to abord on any error message.
SVN revision: 39196
2009-02-25 10:46:14 +00:00
Cedric BAIL
b496774e9e
* eina/src/include/eina_list.h: Add a macro for freeing each element of an Eina_List.
...
SVN revision: 39109
2009-02-20 16:44:26 +00:00
Cedric BAIL
55cfc46ee2
* eina/m4/efl_pthread.m4,
...
* eina/src/modules/mp/chained_pool/Makefile.am,
* eina/src/modules/mp/chained_pool/eina_chained_mempool.c: Now chained mempool are thread safe.
SVN revision: 39058
2009-02-17 14:18:14 +00:00
Cedric BAIL
a98287fc07
* eina/src/lib/eina_module.c: After deleting all members, we should flush the array.
...
SVN revision: 39057
2009-02-17 12:58:09 +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
Jorge Luis Zapata Muga
01ea61f11d
+ Remove unlikely macro debug
...
SVN revision: 38840
2009-01-29 13:06:46 +00:00
Jorge Luis Zapata Muga
d508c49684
+ Make the tiler functions static
...
+ Make the iterator actually work: keep track of current node
SVN revision: 38833
2009-01-28 20:01:42 +00:00
Vincent Torri
8cb92a2ca4
force the files that are in the _DATA primary to be
...
distributed in the tarball
SVN revision: 38832
2009-01-28 18:00:20 +00:00
Vincent Torri
c02331ab22
formatting
...
SVN revision: 38815
2009-01-27 16:59:06 +00:00
Vincent Torri
e9908d6e42
* formatting: new lines are good for reading code
...
* remove comma after EINA_MAGIC (compilation with Visual Studio)
SVN revision: 38814
2009-01-27 16:44:45 +00:00
rephorm
0f053605b9
don't leak
...
SVN revision: 38806
2009-01-27 05:11:16 +00:00
Jorge Luis Zapata Muga
e5123aac83
+ Fix for 64 bit asm
...
+ Fix for MinGW
SVN revision: 38799
2009-01-26 19:35:12 +00:00
Jorge Luis Zapata Muga
75299a9fa3
+ Add eina_cpu subsystem: just query cpu simd operations for now.
...
+ Add eina_tiler subsystem: initially abstraction and import of gustavo's splitter code.
SVN revision: 38793
2009-01-26 16:27:00 +00:00
Jorge Luis Zapata Muga
40d9cab09a
+ Fix some english typos
...
+ Fix some macros that need an expression and there are no attributes support, just pass the expression as is
SVN revision: 38792
2009-01-26 16:23:07 +00:00
Cedric BAIL
1caa0562ad
Add new set of usefull fonctions for eina list.
...
SVN revision: 38791
2009-01-26 14:46:02 +00:00
Vincent Torri
8bee601e8d
fix warnings with vc++
...
SVN revision: 38744
2009-01-23 18:24:35 +00:00
Vincent Torri
29befb161d
put macro after declarations, otherwise vc++ is not happy
...
SVN revision: 38741
2009-01-23 16:43:14 +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
Vincent Torri
da4cbd5c95
put eina_init() and eina_shutdown() in their own header file
...
SVN revision: 38738
2009-01-23 14:46:56 +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
Vincent Torri
7554db7669
too much alloca declarations :-)
...
SVN revision: 38665
2009-01-20 16:14:36 +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
Cedric BAIL
57aadc71fd
Remove warning.
...
SVN revision: 38661
2009-01-20 15:42:34 +00:00
Cedric BAIL
3c2f745ab9
Fix wrong order and useless double include.
...
SVN revision: 38660
2009-01-20 15:40:36 +00:00
Vincent Torri
0d166092ac
* fix warning (missing alloca declaration)
...
* formatting
SVN revision: 38657
2009-01-20 08:29:41 +00:00
tilman
4c70375594
Fixed two trivial const correctness issues.
...
SVN revision: 38621
2009-01-17 17:13:03 +00:00
Carsten Haitzler
430fa42aa4
naruto takahashi's fix for gcc3 patch
...
SVN revision: 38397
2009-01-01 03:09:48 +00:00
handyande
c2bab4e388
Make eina compile on OSX
...
SVN revision: 38382
2008-12-31 11:51:37 +00:00
Cedric BAIL
f2037c5c6f
Don't generate warning in some little case.
...
SVN revision: 38348
2008-12-29 12:41:46 +00:00
Cedric BAIL
f722173009
Don't display useless warning.
...
SVN revision: 38346
2008-12-29 11:49:35 +00:00
Cedric BAIL
73c686a5ea
Fix a little mistake.
...
SVN revision: 38339
2008-12-29 08:53:19 +00:00
Cedric BAIL
e537976f58
Use correct type.
...
SVN revision: 38338
2008-12-29 08:53:01 +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
b0ee5696a6
eina gets lots of gcc attributes to its api.
...
this should help with optimizations and code correctness, please see
"info gcc" for detailed explanation on these.
if you experience some functions not working as expected, please
double check if they're not marked with EINA_PURE or EINA_CONST, maybe
I misused them. Remove the macro and try again.
brief explanation:
* EINA_WARN_UNUSED_RESULT: if you forgot to use the return of some
function, it will emit a warning (and -Werror will make it an
error). This way it will be harder to miss the attribution
"l = eina_list_append(l, v)".
* EINA_ARG_NONNULL(index, index...): if you give it an explicit NULL
argument, or some tool (ie: clang) finds it could get a NULL but
this is not accepted by API, then a warning will be emitted. This
will help those that still use eina_hash_add() as if it is
evas_hash_add().
* EINA_MALLOC: any non-NULL pointer it returns cannot alias any other
pointer valid when function returns.
* EINA_PURE: function have no effects other than the return and this
return just depend on parameters and/or globals. You might call
this function in a loop a thousand times and it will return the
same value, thus you may move this function outside the loop and
remove it.
* EINA_CONST: stricter version of EINA_PURE, it will not check for
global parameters, that is, you cannot consider pointer
arguments. Use it for math things like "int sqrt(int)".
* EINA_PRINTF(fmt, arg): will check format parameter specified in
position "fmt" and passed arguments starting at position "arg", it
will check for things like giving integers where short or strings
were expected.
* EINA_SCANF(fmt, arg): similar to eina_printf().
* EINA_FORMAT(fmt): for use with things like dgettext(), it will get
a printf-like format string and modifies it.
Please review and test it with your software, make sure you make clean
before you install the new version so it has any effect.
If you find some functions are missing EINA_WARN_UNUSED_RESULT and
EINA_ARG_NONNULL or others, please add them.
SVN revision: 38323
2008-12-26 13:17:51 +00:00
Gustavo Sverzut Barbieri
de8b6a7bbd
fix possible errors with pointer/offset calculation.
...
it works on gcc, but maybe it would break in other compilers, so make
it safe.
SVN revision: 38302
2008-12-23 20:05:44 +00:00
Gustavo Sverzut Barbieri
7eb0826e29
remove dead stores and reduce some variable scope.
...
from clang report.
SVN revision: 38294
2008-12-23 19:17:55 +00:00
Cedric BAIL
fb238897e5
Use float instead of double.
...
SVN revision: 38292
2008-12-23 17:23:35 +00:00
Cedric BAIL
e006567cb0
Make it compile on Solaris.
...
SVN revision: 38290
2008-12-23 13:33:11 +00:00
Cedric BAIL
2c9ac0bd82
Remove now uneeded header.
...
SVN revision: 38289
2008-12-23 13:23:10 +00:00
Cedric BAIL
889d40abf8
Remove PATH_MAX use.
...
SVN revision: 38288
2008-12-23 13:12:06 +00:00
Cedric BAIL
6a87ca7590
Make code understandable by Visual Studio.
...
SVN revision: 38287
2008-12-23 10:04:46 +00:00
Cedric BAIL
c8714d04cc
Declaration should be done before any code.
...
SVN revision: 38286
2008-12-23 10:02:27 +00:00
Gustavo Sverzut Barbieri
765b770f82
oops, eina_stringshare_strlen() should never account '\0'.
...
SVN revision: 38260
2008-12-21 06:45:09 +00:00
Cedric BAIL
5383cabf2b
Fix EINA_ARRAY_ITER_NEXT off by one bug. With this fix you can no longer push
...
NULL pointer inside an array.
SVN revision: 38232
2008-12-19 17:55:57 +00:00
Cedric BAIL
3d41b74146
Update ac_attribute macro and remove __UNUSED__ declaration from eina.
...
SVN revision: 38179
2008-12-17 13:03:00 +00:00
Cedric BAIL
c80a55ee14
Add small bucket support.
...
SVN revision: 38168
2008-12-16 16:49:29 +00:00
Cedric BAIL
00b5758937
Add include to remove warning.
...
SVN revision: 38167
2008-12-16 16:49:00 +00:00
Cedric BAIL
db11d16b7f
Manipulating NULL iterator should be concidered as a defined behaviour as it
...
give the possibility to write small code like :
it = eina_hash_iterator_tuple_new(hash);
eina_iterator_foreach(it, do_something_cb, NULL);
eina_iterator_free(it);
If hash is empty, but valid it will return a NULL iterator for this
example.
SVN revision: 38104
2008-12-11 13:54:59 +00:00
Cedric BAIL
b8d721ac05
If we set the data free callback of a hash, we expect it to be called when
...
calling all eina_hash_del functions.
SVN revision: 38102
2008-12-11 13:47:58 +00:00
Cedric BAIL
9b9f752379
Only allocate hash bucket when needed.
...
Make eina_hash_del_by_key really different from eina_hash_del.
SVN revision: 38064
2008-12-09 17:39:48 +00:00
Cedric BAIL
00e8fba9ba
All eina_hash_find* functions should not report problem when hash or key is NULL.
...
SVN revision: 38059
2008-12-09 14:59:30 +00:00
Cedric BAIL
8ee267ec0d
Remove uneeded included.
...
SVN revision: 38058
2008-12-09 14:30:54 +00:00
Cedric BAIL
b0e1863871
eina_hash_find should not complain when hash or key is NULL.
...
SVN revision: 38057
2008-12-09 14:24:08 +00:00
Cedric BAIL
68cfd7839f
Add a visual feedback to counte test.
...
SVN revision: 38056
2008-12-09 13:58:04 +00:00
Cedric BAIL
24c1995b68
Change eina_counter_dump to return a string so it could work easily on windows.
...
SVN revision: 38055
2008-12-09 13:55:10 +00:00