Vincent Torri
8bee601e8d
fix warnings with vc++
...
SVN revision: 38744
2009-01-23 18:24:35 +00:00
Vincent Torri
092927d13e
add eina_main.h in vc project
...
SVN revision: 38742
2009-01-23 16:44:25 +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
Vincent Torri
ca0cbdbec7
update ac_attribute.m4
...
SVN revision: 38579
2009-01-14 08:36:16 +00:00
Vincent Torri
cc7b4554cb
The problem of the detection of __attribute__ on mac os x comes
...
from the fact that we put a definition of a function in the
body of main(). Moving it outside fixes it. In addition, the
extra flag i added in configure.ac is useless.
SVN revision: 38565
2009-01-13 06:19:47 +00:00
Vincent Torri
f84454ed08
mac os x port of gcc has problems with __attribute__ and thinks that
...
there are nested functions. -fnested-functions must be passed to the
compiler to allow the compilation on that platform.
SVN revision: 38544
2009-01-11 09:25:47 +00:00
Daniel Kolesa
b61dff0b58
Added debian/rules files with a new permissions set(755).
...
SVN revision: 38519
2009-01-09 16:33:51 +00:00
Daniel Kolesa
971b1682a9
prepare debian rules files for new chmod permissions.
...
SVN revision: 38518
2009-01-09 16:31:51 +00:00
Daniel Kolesa
2bf1434120
Added new set of debian subdirs.
...
BROKEN/etox
e
ecore
e_dbus
edje
edje_editor
edje_viewer
eet
efreet
eina
elicit
elitaire
embryo
E-MODULES-EXTRA
emotion
emphasis
empower
emprint
enhance
enity
entrance
ephoto
epsilon
esmart
estickies
etk
etk_extra
evas
evolve
ewl
exhibit
exml
expedite
imlib2
imlib2_loaders
MISC/engage
OLD/eclair
OLD/engrave
OLD/enotes
OLD/entrance_edit_gui
OLD/e_utils
OLD/evoak
OLD/examine
OLD/iconbar
PROTO/etk_server
PROTO/exchange
PROTO/extrackt
rage
SVN revision: 38399
2009-01-01 11:35:17 +00:00
Daniel Kolesa
bf77c1ced2
Removed debian subfolders - prepared for a new set of debian subdirs.
...
SVN revision: 38398
2009-01-01 11:25:05 +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
Iván Briano
025c3d8422
Let's see if the number of people asking what Eina is remains the same.
...
SVN revision: 38354
2008-12-30 15:38:11 +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
b6e27a739f
oops, it's EINA_SAFETY_CHECKS, not just SAFETY_CHECKS.
...
SVN revision: 38328
2008-12-26 19:14:57 +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
dm
77dedbca06
Eina Win32 VS8 project added
...
SVN revision: 38282
2008-12-22 23:20:52 +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
Cedric BAIL
af30207725
eina_hash_del must honor the data parameter when the key is passed. Propagate
...
it correctly.
SVN revision: 38054
2008-12-09 13:52:09 +00:00
Cedric BAIL
273b7422d6
It's cleaner to first include private header as they could define macro
...
differently than public interface.
SVN revision: 38050
2008-12-09 13:06:17 +00:00
Cedric BAIL
d19801f7c2
Prevent warning from Eina Magic when hash population is 0.
...
SVN revision: 38049
2008-12-09 13:05:33 +00:00
Cedric BAIL
55d9c97446
__UNUSED__ macro is not exported by eina.
...
SVN revision: 38045
2008-12-09 11:01:12 +00:00
Cedric BAIL
5358b1f84f
Add integer and pointer hash table helper.
...
SVN revision: 38026
2008-12-08 17:31:55 +00:00
Cedric BAIL
c7b0e0a6b3
Fix include related to previous Eina Magic patch.
...
SVN revision: 38017
2008-12-08 10:51:51 +00:00
Cedric BAIL
199f900908
Application and library using Eina Magic API should be able to decide if they
...
want to check magic or not. This should not be forced by Eina config.
SVN revision: 38014
2008-12-08 10:18:05 +00:00
Gustavo Sverzut Barbieri
8ea28f64b7
hash: better handling of NULL, add magic checking.
...
* evas: if we automatically destroy hash, check for NULL before
handling it to eina api, which expect elements to be created with
eina_hash_new() and thus will fail on NULL.
* eina: add magic checking for eina_hash and eina_hash_iterator, this will
help spot when NULL is used.
* eina_hash_foreach: do not try to create the iterator if hash is NULL.
SVN revision: 37982
2008-12-07 13:28:29 +00:00
Gustavo Sverzut Barbieri
b21c687f61
refactor eina_hash_del*, expose simpler functions and avoid GCC hack.
...
By using simpler functions for hash element deletion we can avoid the
hack to shut up GCC warking about hash_num not being used. As these
simple functions are more often needed than the catch-all, expose them
as well.
SVN revision: 37962
2008-12-06 06:58:56 +00:00
Gustavo Sverzut Barbieri
09924b54e5
Let valgrind help with EINA_MAGIC.
...
Keep EINA_MAGIC at the end of the structure (WHEN POSSIBLE! Watch out
flexible arrays like char str[] at the end!)
this way if parts use EINA_MAGIC and others do not, it will possible overflow and valgrind can help us.
WARNING: make uninstall before update! Then make clean and make install, check if everything is working with "make check".
SVN revision: 37961
2008-12-06 06:53:14 +00:00
Gustavo Sverzut Barbieri
5939d76d9c
Fix couple of issues with MAGIC handling.
...
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
2008-12-06 06:17:11 +00:00
Gustavo Sverzut Barbieri
08832b519b
grow array only when required, use step properly.
...
We need to grow when we reach total amount, not when current + step > total.
SVN revision: 37959
2008-12-06 06:13:55 +00:00
Gustavo Sverzut Barbieri
091741f861
Force dummy_symbol to be visible.
...
"make check" was failing with -fvisibility=hidden.
SVN revision: 37958
2008-12-06 06:12:30 +00:00
Gustavo Sverzut Barbieri
6203f4b6be
do not segv on NULL inlist.
...
this was exposed by "make check", counter had no tests and it was failing.
SVN revision: 37957
2008-12-06 06:11:39 +00:00
Gustavo Sverzut Barbieri
a00eaac6a6
Make it possible to create iterators outside Eina.
...
Many places in EFL we just create walk something, create a list with
walked data, return, then the user walks it again and then deletes
(which will walk again). For such cases it's way better to define
iterators or accessors.
I'm not moving any EFL code to it now, but if people are interested,
things like evas_render_method_list(), evas_font_available_list(),
evas_objects_at_xy_get(), evas_objects_in_rectangle_get(),
evas_object_smart_members_get() are good candidates. If the subject is
already using Eina list, then you can just use
eina_list_iterator_new() and return it, otherwise you can define your
own iterator, which is very easy.
SVN revision: 37956
2008-12-06 03:41:03 +00:00
Gustavo Sverzut Barbieri
b023145eed
shut up gcc warning, with comment.
...
SVN revision: 37953
2008-12-06 03:02:30 +00:00
Carsten Haitzler
84f8c174bf
fix list accounting on sort! bad - how did this hide for so long?
...
SVN revision: 37951
2008-12-06 02:51:04 +00:00
Gustavo Sverzut Barbieri
f8868ffa96
Fix namespace: Eina_Foreach -> Eina_Hash_Foreach.
...
SVN revision: 37950
2008-12-06 02:21:17 +00:00
Gustavo Sverzut Barbieri
03fca99e56
Add safe Eina list walk function.
...
SVN revision: 37949
2008-12-06 02:13:01 +00:00
Chidambar Zinnoury
5c2c6049f1
Use includedir instead of prefix/include to install Eina headers.
...
SVN revision: 37925
2008-12-04 16:25:40 +00:00
Chidambar Zinnoury
ef7cd1e966
Typo: --enable enables an option.
...
SVN revision: 37913
2008-12-03 17:27:51 +00:00
Cedric BAIL
9a5b397a3e
Fix a little memory leak when iterating.
...
SVN revision: 37718
2008-11-20 13:26:18 +00:00
Vincent Torri
1b00e273ed
eina needs dl functions (Windows)
...
SVN revision: 37583
2008-11-11 07:22:47 +00:00
Cedric BAIL
5257321d9a
Fix some constness.
...
SVN revision: 37576
2008-11-10 16:23:56 +00:00
Cedric BAIL
aa82395cc1
Fix order of free during hash free.
...
SVN revision: 37572
2008-11-10 14:32:14 +00:00
Vincent Torri
a00a2a3636
put static functions where they belong
...
SVN revision: 37552
2008-11-08 16:47:52 +00:00
Sebastian Dransfeld
4173b41de5
Add missing return value.
...
SVN revision: 37528
2008-11-07 06:50:45 +00:00
Cedric BAIL
e8ed3963c8
Add eina_array_data_set.
...
SVN revision: 37475
2008-11-05 17:16:07 +00:00
Cedric BAIL
e63dde947d
Fix documentation.
...
SVN revision: 37474
2008-11-05 16:20:37 +00:00
Gustavo Sverzut Barbieri
9e80a086f6
Add and use eina_stringshare_ref().
...
This is a faster "add", if we know we're using a shared string we know
the node without any need to search it, just increment reference and
exit.
SVN revision: 37458
2008-11-04 16:25:12 +00:00
Vincent Torri
c8e2f1f51f
small doc fix
...
SVN revision: 37407
2008-11-02 09:41:14 +00:00
Cedric BAIL
437c220266
Add dladdr and env code for eina_module from Vincent Torri.
...
SVN revision: 37374
2008-11-01 15:39:53 +00:00
Vincent Torri
c2d7540e84
ffs does not exist on windows CE, so use Evil
...
SVN revision: 37367
2008-11-01 07:33:02 +00:00
Vincent Torri
602c8edb12
formatting
...
SVN revision: 37358
2008-10-31 16:59:45 +00:00
Cedric BAIL
8748f83f01
Make eina rectangle handle NULL case.
...
SVN revision: 37328
2008-10-30 10:54:58 +00:00
Gustavo Sverzut Barbieri
c1d2134caf
Pack a hole when magic is in use.
...
SVN revision: 37324
2008-10-29 23:50:24 +00:00
Carsten Haitzler
9f157c260c
error macro.
...
SVN revision: 37323
2008-10-29 23:41:55 +00:00
Gustavo Sverzut Barbieri
a39edb7baa
Do not pad node on 64bits.
...
Instead of padding node we should always refer to offset of str[]
inside node, that way we save some bytes and work properly.
SVN revision: 37322
2008-10-29 23:33:24 +00:00
Carsten Haitzler
b4f33c6358
add error catching and output if mempool alloc/init fails.
...
SVN revision: 37321
2008-10-29 23:12:56 +00:00
Gustavo Sverzut Barbieri
5e30ab4563
Remove unused attribute warnings.
...
SVN revision: 37307
2008-10-29 14:51:18 +00:00
Gustavo Sverzut Barbieri
f22f587bab
Fix stringshare on 64bits platforms.
...
sizeof(Eina_Stringshare_Node) is now 24 bytes on 64bits platforms, but
str[] was pointing to before that, to the 20th byte, causing out of
bounds access.
Adding the padding will cause str[] to use the correct position. It
wastes 4 more bytes, like pre-optimizations, but it's just on big
machines.
SVN revision: 37305
2008-10-29 14:18:29 +00:00
Carsten Haitzler
0e4dcecbc4
remove from list properly and don't segv!
...
SVN revision: 37290
2008-10-29 01:38:47 +00:00
Gustavo Sverzut Barbieri
71f9c5aab7
refactor eina_stringshare_del() to make it easier to read.
...
SVN revision: 37282
2008-10-28 18:12:10 +00:00
Gustavo Sverzut Barbieri
1119bfebc1
improve readability: avoid macros inside our code
...
mixing #ifdef'ed blocks inside code is bad, can lead to warnings if
some variables are not used and it's a pain to read.
instead, just define functions and always call them, choose their
implementation based on the ifdef macros. I opted to have 2
declarations, but one can go like other parts and #ifdef around the
function contents as well.
SVN revision: 37281
2008-10-28 17:47:59 +00:00
Gustavo Sverzut Barbieri
e9a398e076
test small strings.
...
SVN revision: 37280
2008-10-28 17:19:02 +00:00
Gustavo Sverzut Barbieri
a5db129f56
Add missing magic check for existing node.
...
SVN revision: 37279
2008-10-28 17:16:42 +00:00
Gustavo Sverzut Barbieri
2569094023
Code refactor and cleanup of eina_stringshare_add().
...
Cases are now handled in separate, doing less useless steps and easier
to understand since 3 cases are now distinct.
SVN revision: 37278
2008-10-28 17:15:07 +00:00
Cedric BAIL
a299da4fb5
This test is now not defined. Remove it.
...
SVN revision: 37277
2008-10-28 16:40:34 +00:00
Gustavo Sverzut Barbieri
72ae858dac
fix _GET macros.
...
SVN revision: 37276
2008-10-28 16:37:32 +00:00
Cedric BAIL
e243e4408a
Make Eina_Rectangle_Pool more usable.
...
SVN revision: 37275
2008-10-28 15:28:46 +00:00
Cedric BAIL
4592044c82
Fix a little typo.
...
SVN revision: 37274
2008-10-28 14:45:16 +00:00
Gustavo Sverzut Barbieri
96adb8e1f0
save a byte per stringshare node.
...
we don't need to use 'begin' flag (that takes a byte) just to see if
we're in the same memory block as the head, just do a pointer math.
SVN revision: 37270
2008-10-28 12:34:58 +00:00
Gustavo Sverzut Barbieri
0b1e2fa0dc
reduce the popuplation_group size.
...
we just have special case for up to 3 letters, everything else is
regular population.
SVN revision: 37269
2008-10-28 12:26:05 +00:00
Gustavo Sverzut Barbieri
3cd98b547a
stringshare_del optimization.
...
trade off safety by speed, we will always assume str was previously
shared, like evas_stringshare_del() did and we can know with zero-cost
the number of references and can avoid strlen() too.
When references drop to zero we still have to do the hash, access the
bucket and then lookup the Red-Black tree, then walk the list of
nodes, but avoiding so would use more memory, unacceptable at this
point.
SVN revision: 37268
2008-10-28 12:23:12 +00:00
Gustavo Sverzut Barbieri
8325ae6ba3
Save 4 bytes per big string shared.
...
SVN revision: 37258
2008-10-28 00:42:35 +00:00
Gustavo Sverzut Barbieri
24ee564949
Cheap way to get strlen of a shared string.
...
it's not safe, but it's faster and can help for large strings, maximum
cost is 4 comparisons plus one pointer access.
SVN revision: 37257
2008-10-28 00:31:09 +00:00
Gustavo Sverzut Barbieri
16aed2623d
define function as void as in prototype.
...
SVN revision: 37256
2008-10-28 00:18:31 +00:00
Gustavo Sverzut Barbieri
d4ac927395
dump show percentages.
...
not that useful, but I like it.
SVN revision: 37253
2008-10-27 20:35:28 +00:00
Cedric BAIL
72e45419ec
Add Eina_Rectangle_Pool support. Typically help for font handling in OpenGL or
...
any case where you need to split a rectangle in many differents small rectangle.
SVN revision: 37252
2008-10-27 20:24:12 +00:00
Gustavo Sverzut Barbieri
db296d3d3c
better optimize small stringshare comparison
...
SVN revision: 37251
2008-10-27 20:16:52 +00:00
Gustavo Sverzut Barbieri
c311dd99a2
stringshare: special case for small (2-3 letters).
...
This should reduce overhead and give a bit speedup as well, let's test
with e17 real data and see how it goes.
SVN revision: 37250
2008-10-27 19:26:14 +00:00
Sebastian Dransfeld
0b115add8e
Since CLOCK_PROCESS_CPUTIME_ID is a POSIX standard, we use it if it
...
exists regardles of system. Seems BSD actually is the weird case here.
Still use CLOCK_REALTIME as fallback.
SVN revision: 37249
2008-10-27 15:16:06 +00:00
Sebastian Dransfeld
23fdacaa1e
Better fallback on clock as suggested by Naruto TAKAHASHI
...
SVN revision: 37248
2008-10-27 15:08:46 +00:00
Sebastian Dransfeld
3488ca351f
Fix CLOCK as suggested by Ravenlock.
...
SVN revision: 37247
2008-10-27 14:19:55 +00:00
Cedric BAIL
45273db267
Correctly put condition around the code.
...
SVN revision: 37244
2008-10-27 14:05:09 +00:00
Cedric BAIL
d46f7e583e
* Optimize case for string length == 0 and 1.
...
* Add more debug information when using --enable-stringshare-usage.
SVN revision: 37239
2008-10-27 13:23:52 +00:00
Sebastian Dransfeld
b6ddfb54cf
Mark unused parameter with __UNUSED__
...
SVN revision: 37214
2008-10-27 09:49:13 +00:00
Carsten Haitzler
089b8ac181
add a stringshare dumper so we can examine what's in there and improve usage.
...
SVN revision: 37186
2008-10-27 00:36:22 +00:00
Michael Jennings
a9ad1b5aeb
Sat Oct 25 11:41:49 2008 Michael Jennings (mej)
...
Add spec file for eina.
----------------------------------------------------------------------
SVN revision: 37104
2008-10-25 18:46:18 +00:00
Eric Schuele
190a7b56c7
Build on FreeBSD. Patch from Naruto, plus a tweak to remove the unneeded libdl.
...
SVN revision: 37103
2008-10-25 18:17:22 +00:00
Carsten Haitzler
7d0d0aaf7f
handle some bizarre build issues...
...
SVN revision: 37048
2008-10-24 10:57:00 +00:00
Sebastian Dransfeld
a8c2834987
modules most export init and shutdown as EAPI
...
SVN revision: 37042
2008-10-24 06:24:08 +00:00
Davide Andreoli
eacf00b6d7
small doxy fix
...
SVN revision: 37037
2008-10-24 00:37:09 +00:00
Cedric BAIL
b114ef85de
Really return Eina_Bool.
...
SVN revision: 37022
2008-10-23 12:50:33 +00:00
Cedric BAIL
4bb02bdf37
Add more error information during eina module load.
...
SVN revision: 36955
2008-10-22 08:56:19 +00:00
Gustavo Sverzut Barbieri
93a280b7d7
eina_bool is now an unsigned char.
...
This makes clear what size and if we have a signal or not in our type,
so no compilers have the right to choose different for us (like they
do with enum).
Also fixes compile of C++ programs with eina_rectangle.h, that
contains some inline code, the expression evaluates a boolean
expression and compiler does not know how to convert that to old
Eina_Bool.
SVN revision: 36939
2008-10-21 15:21:37 +00:00
Cedric BAIL
430fb672cd
Rename EINA_LIST_ITER_NEXT to EINA_LIST_FOREACH.
...
SVN revision: 36930
2008-10-21 12:49:29 +00:00
Cedric BAIL
68d377afe6
Rename EINA_INLIST_ITER_NEXT/EINA_INLIST_ITER_LAST to EINA_INLIST_FOREACH/
...
EINA_INLIST_REVERSE_FOREACH so it best match is behaviour. Asked by Gustavo.
SVN revision: 36928
2008-10-21 12:19:57 +00:00
kaethorn
ac8b1a4cf9
Add Debian files.
...
SVN revision: 36927
2008-10-21 12:07:40 +00:00
Cedric BAIL
1950725606
Add merge function to list data type.
...
SVN revision: 36922
2008-10-21 11:28:38 +00:00
Cedric BAIL
c9779e876f
Actually include eina_convert in the main header.
...
SVN revision: 36860
2008-10-20 15:01:01 +00:00
Cedric BAIL
93711c814e
Fix hash iterator to iterate with only one element.
...
SVN revision: 36858
2008-10-20 14:45:01 +00:00
Cedric BAIL
a52cc857fa
Put the mempool backend structure with other structure.
...
SVN revision: 36855
2008-10-20 13:23:18 +00:00
Cedric BAIL
6734c580df
Zero is a correct value.
...
SVN revision: 36854
2008-10-20 13:21:52 +00:00
Carsten Haitzler
31727e370d
actually compile!
...
SVN revision: 36849
2008-10-20 12:08:16 +00:00
Cedric BAIL
4953eb74fe
Apps can now provide their own mempool.
...
SVN revision: 36847
2008-10-20 11:40:01 +00:00
Carsten Haitzler
f3acb81ceb
and remvoe cats
...
SVN revision: 36834
2008-10-20 04:30:21 +00:00
Carsten Haitzler
6f25f98c72
make eina able to do automake 1.9 and before... :)
...
SVN revision: 36833
2008-10-20 04:25:13 +00:00
Vincent Torri
84dcc24d09
Fix compilation and warnings on Windows:
...
* include Evil.h for getenv on mingw32ce
* include config.h in benchmark.c so that EAPI is correctly defined
* minor fixes in configure.ac
SVN revision: 36729
2008-10-16 21:31:51 +00:00
Cedric BAIL
beb2b251b5
Seems better that way.
...
Thanks for your help ni1s.
SVN revision: 36691
2008-10-15 16:47:54 +00:00
Cedric BAIL
03043eb74d
Oops forgot this one.
...
SVN revision: 36690
2008-10-15 16:40:57 +00:00
Cedric BAIL
380120ce2a
Should fix build outside of the source tree.
...
SVN revision: 36689
2008-10-15 16:23:14 +00:00
Cedric BAIL
d905ee9bda
Add option to report stringshare usage (E17 use around 10000 differents strings).
...
SVN revision: 36658
2008-10-14 15:32:57 +00:00
Cedric BAIL
ed012620d1
Fix stringshare bug with same length.
...
SVN revision: 36657
2008-10-14 15:31:45 +00:00
Cedric BAIL
a61ba1c35a
Fix some warning.
...
SVN revision: 36563
2008-10-10 09:33:40 +00:00
Vincent Torri
82e185693f
and update comments
...
SVN revision: 36554
2008-10-09 20:24:40 +00:00
Vincent Torri
12a528086a
bug--
...
SVN revision: 36553
2008-10-09 20:20:38 +00:00
Vincent Torri
5063c86f4f
fix doxygen m4 macro (make it more efl-ish and fix a bug)
...
SVN revision: 36552
2008-10-09 20:16:41 +00:00
Cedric BAIL
5cddd1f760
Remove dead code.
...
SVN revision: 36493
2008-10-07 11:07:03 +00:00
Cedric BAIL
d3ba8a9e2e
Actually bench djb2 inline and not superfast hash function.
...
SVN revision: 36480
2008-10-06 14:48:13 +00:00
Cedric BAIL
195b2da188
Give more choice to eina_list mempool.
...
SVN revision: 36479
2008-10-06 14:47:09 +00:00
Cedric BAIL
b158ab48ed
Update hash benchmark to reflect E use (hash population under 2000, more find than add).
...
Current status :
- same performance for evas, eina and glib with les than 500 items.
- glib is then faster, eina/evas are second until 800.
- glib remain the fastest, eina is second, and evas is starting to drop in performance.
SVN revision: 36476
2008-10-06 12:16:27 +00:00
Vincent Torri
39fc2ca916
rename result files so that we can check out on Windows
...
SVN revision: 36448
2008-10-05 16:10:17 +00:00
Vincent Torri
89d5e6f073
* add detection of SIMD and thread support
...
* minor formatting
SVN revision: 36418
2008-10-03 15:28:13 +00:00
Cedric BAIL
36b46ca065
Remove dead declaration.
...
SVN revision: 36399
2008-10-02 16:23:27 +00:00
Cedric BAIL
439401682d
Reduce code size, and improve sort speed.
...
SVN revision: 36382
2008-10-01 16:30:30 +00:00
Peter Wehrfritz
beaa909d45
configure.in -> configure.ac
...
SVN revision: 36364
2008-09-30 18:07:29 +00:00
Cedric BAIL
a44f814dd2
Using mempool improve cache locality and speed list manipulation like sort.
...
SVN revision: 36363
2008-09-30 16:48:28 +00:00
Cedric BAIL
b1768c99e6
Make eina_error depend on no other sub module that need initialization.
...
SVN revision: 36361
2008-09-30 16:25:11 +00:00
Cedric BAIL
9ef4d6b65d
Benchmark glib mempool too.
...
SVN revision: 36360
2008-09-30 15:07:35 +00:00
Cedric BAIL
9ffada517d
Faster sort initialisation.
...
SVN revision: 36359
2008-09-30 14:16:18 +00:00
Cedric BAIL
3315d29c7f
Fix chained mempool allocator.
...
SVN revision: 36355
2008-09-30 12:55:33 +00:00
Cedric BAIL
88d0babd0c
Don't remove previous result of benchmark.
...
SVN revision: 36354
2008-09-30 12:55:06 +00:00
Vincent Torri
f9a4c97693
add a config.h
...
SVN revision: 36342
2008-09-30 06:16:41 +00:00
Vincent Torri
bf372e44f9
when a .la file is passed to _LIBADD or _LDADD, automake
...
knows that the corresponding program or lib depends on
that .la file
SVN revision: 36322
2008-09-29 19:30:15 +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
d25b46df3e
As real data came from e17. Little rename.
...
SVN revision: 36320
2008-09-29 17:08:25 +00:00
Cedric BAIL
0bc2413113
Fix prev pointer during stringshare_del.
...
SVN revision: 36319
2008-09-29 17:07:50 +00:00
Cedric BAIL
b6960f58b6
Patch from Vincent Torri that cleanup tests, coverage and benchmark.
...
SVN revision: 36315
2008-09-29 14:35:28 +00:00
Cedric BAIL
7c47066009
Change module API to use Eina_Array as we want to use mempool and module for Eina_List.
...
Fix at the same time a closing bug in eina_module.c.
SVN revision: 36312
2008-09-29 13:28:42 +00:00
Cedric BAIL
fcfa65f9a9
Update configure as we now need automake 1.10.
...
SVN revision: 36310
2008-09-29 09:46:27 +00:00
Cedric BAIL
1620af2ae0
Add benchmark for mempool (chained_mempool is disabled, because it's currently buggy).
...
SVN revision: 36309
2008-09-29 09:45:26 +00:00
Cedric BAIL
93656a916a
Fix initialization.
...
SVN revision: 36308
2008-09-29 09:43:37 +00:00
Cedric BAIL
3564707421
Fix initialization and cleanup.
...
SVN revision: 36307
2008-09-29 09:42:04 +00:00
Vincent Torri
d6ae9053ad
minor formatting
...
SVN revision: 36293
2008-09-28 13:10:08 +00:00
Vincent Torri
79375f9123
* fix clean and dist rules
...
* create eina-$(maj_version).pc.in file automatically
SVN revision: 36292
2008-09-28 12:43:21 +00:00
Vincent Torri
c403c14b1e
let the user specify his own CFLAGS
...
SVN revision: 36288
2008-09-28 11:13:31 +00:00
Cedric BAIL
2acd11a39e
Add a new type of memory pool and factorize test code.
...
SVN revision: 36267
2008-09-26 15:27:46 +00:00
Cedric BAIL
8b33d245e6
Inlined functions require NULL, so including stdlib.h is required.
...
SVN revision: 36266
2008-09-26 15:26:36 +00:00
Cedric BAIL
a466b34ea0
Faster sort from Alexandre Becoulet integrated by quarium inside eina.
...
SVN revision: 36265
2008-09-26 13:45:30 +00:00
Cedric BAIL
6f5b3584dd
Store build information inside eina_config.h, and fix magic use.
...
SVN revision: 36263
2008-09-26 11:41:55 +00:00
Cedric BAIL
42d39725b4
Last part of quarium patch.
...
SVN revision: 36257
2008-09-25 14:46:48 +00:00
Cedric BAIL
8b85ce70d4
Patch from quarium.
...
Add magic to array and list.
Need to patch autotools to generate something like eina_config.h.
SVN revision: 36256
2008-09-25 14:46:16 +00:00
Cedric BAIL
e8b25fb405
Add a sort benchmark.
...
SVN revision: 36250
2008-09-25 12:41:49 +00:00
Cedric BAIL
040e5573d9
Patch from Arnaud de Turckheim "quarium" <quarium@gmail.com>.
...
Use magic inside stringshare without slowdown of benchmark.
Fix magic when not in DEBUG mode.
SVN revision: 36246
2008-09-25 09:02:41 +00:00
Cedric BAIL
4fddcc38df
Fix error stuff.
...
SVN revision: 36225
2008-09-24 17:21:53 +00:00
Cedric BAIL
8072173d6e
As evas use of hash is below 3000 items per hash, update the tests accordingly.
...
SVN revision: 36224
2008-09-24 17:20:24 +00:00
Cedric BAIL
eec2db6edb
Fix test due to mempool internal change.
...
SVN revision: 36223
2008-09-24 17:17:22 +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
Jorge Luis Zapata Muga
5ed8ea7e09
+ Make the benchmark compile again
...
+ Remove unused code
SVN revision: 36213
2008-09-24 13:59:00 +00:00
Cedric BAIL
bf418729d2
Group all rbtree functions.
...
SVN revision: 36209
2008-09-24 12:58:31 +00:00
Cedric BAIL
b00e9e5c64
Use rbtree helper.
...
SVN revision: 36208
2008-09-24 12:57:26 +00:00
Jorge Luis Zapata Muga
c9f08f6124
New module API. Port this API to the mempool subsystem and the tests.
...
Now the modules can define a default function that will be called when the module is loaded and unloaded.
SVN revision: 36207
2008-09-24 12:55:31 +00:00
Cedric BAIL
8acad8a50e
Add rbtree destructor without tree reorder and use it.
...
SVN revision: 36188
2008-09-23 16:07:48 +00:00
Vincent Torri
476222cc6c
add main doc for eina_convert
...
SVN revision: 36187
2008-09-23 15:57:57 +00:00
Vincent Torri
3edd75f9ba
formatting
...
SVN revision: 36179
2008-09-23 05:24:26 +00:00
Vincent Torri
4313d2b084
* fix list doc
...
* minor other doc fixes
* link the mempool modules statically to libeina when requested
* don't compile static lib of mempool when they are built as shared lib
SVN revision: 36178
2008-09-23 05:17:49 +00:00
Cedric BAIL
f656fabac1
Make magical mask easily testable.
...
SVN revision: 36171
2008-09-22 14:45:57 +00:00
Cedric BAIL
201bba1ba8
Add benchmark for evas (also add ecore bench, but it's deactivated by default,
...
as i can't run it on my computer).
SVN revision: 36170
2008-09-22 14:27:50 +00:00
Cedric BAIL
d0871d7d7d
Eina stringshare now beat evas and ecore with this last change.
...
Benchmarking with enlightenment real data (25000 string add, 20 000 del) :
- eina: 4151399
- evas: 4286973
- ecore: 7753004
SVN revision: 36166
2008-09-22 13:11:08 +00:00
Cedric BAIL
d3e0b59223
Reduce number of malloc/free by automatically created one stringshare
...
per tree node.
SVN revision: 36165
2008-09-22 13:06:29 +00:00
Cedric BAIL
3fc07d2aac
Add helper for inlined red black tree manipulation.
...
SVN revision: 36164
2008-09-22 13:02:08 +00:00
Cedric BAIL
60d10a0b9e
Fix new inlist API.
...
SVN revision: 36163
2008-09-22 13:00:52 +00:00
Cedric BAIL
1726e80939
Use define.
...
SVN revision: 36159
2008-09-22 10:08:44 +00:00
Vincent Torri
0b93ba01a6
add doc to the counter module. remove the link to the
...
tutorial (the module is too short for a tutorial to be
useful)
SVN revision: 36126
2008-09-20 09:46:54 +00:00
Vincent Torri
f196383f8f
finish doc of the file module. Add a warning if eina_file_split() is used
...
SVN revision: 36122
2008-09-20 08:42:35 +00:00
Vincent Torri
ddc956b313
configuration of static build of memory pools
...
i'll do an m4 macro later
SVN revision: 36100
2008-09-19 14:10:05 +00:00
Cedric BAIL
44c684bd36
Remove warning due to Inlist API change.
...
SVN revision: 36098
2008-09-19 12:40:18 +00:00
Cedric BAIL
710354bd96
Change eina_benchmark_register API as it can fail in many occasion.
...
SVN revision: 36097
2008-09-19 12:32:24 +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
Vincent Torri
f50feadeae
* add benchmark and file documentation
...
* reorganize a bit more. it's not finished
* fix spellingg and formatting
* gnuplot file names generated by our bechmarks tests have an
absolute time description and not H:M:S description, as this
breaks the check out of the repo on Windows.
SVN revision: 36090
2008-09-19 05:22:43 +00:00
Cedric BAIL
8bda22fced
Add some type checking to Inlined List.
...
SVN revision: 36084
2008-09-18 14:22:48 +00:00
Cedric BAIL
80e138df1b
Remove moved declaration.
...
SVN revision: 36082
2008-09-18 14:21:38 +00:00
Cedric BAIL
02a24e53dc
Include meaningfull header.
...
SVN revision: 36081
2008-09-18 14:20:45 +00:00
Cedric BAIL
fc08f85167
Make module path global to all bench.
...
SVN revision: 36080
2008-09-18 14:19:50 +00:00
Cedric BAIL
ad793833c6
Set module path for all tests.
...
SVN revision: 36079
2008-09-18 14:17:48 +00:00
Cedric BAIL
4423005ab4
Avoid some dereferencing and provide inline for mempool alloc/free/realloc.
...
SVN revision: 36078
2008-09-18 14:16:47 +00:00
Cedric BAIL
d4ae3fc7e1
Include the usefull header.
...
SVN revision: 36077
2008-09-18 14:14:30 +00:00
Cedric BAIL
210ff33edf
Another forgotten initialization.
...
SVN revision: 36076
2008-09-18 14:12:33 +00:00
Cedric BAIL
0d9b2f3f8d
Remove useless counter init/shutdown.
...
SVN revision: 36075
2008-09-18 12:24:07 +00:00
Cedric BAIL
ce16573cb3
Add init/shutdown to benchmark and fix its users.
...
SVN revision: 36073
2008-09-18 10:04:46 +00:00
Cedric BAIL
ac21afc37f
Reduce code size.
...
SVN revision: 36072
2008-09-18 10:04:01 +00:00
Cedric BAIL
27040661af
Use global EINA_ERROR_OUT_OF_MEMORY.
...
SVN revision: 36071
2008-09-18 10:03:34 +00:00
Cedric BAIL
c17a9848a3
Forgotten initialization.
...
SVN revision: 36070
2008-09-18 10:02:40 +00:00
Cedric BAIL
9d54723060
Add forgotten declaration.
...
SVN revision: 36069
2008-09-18 10:01:45 +00:00
Vincent Torri
54de28cc68
* add doc for counter and convert modules
...
* minor spelling, formatting and doxygen fixes
SVN revision: 36057
2008-09-17 18:55:54 +00:00
Cedric BAIL
96bfcc0395
Add another mempool test.
...
SVN revision: 36054
2008-09-17 16:33:16 +00:00
Cedric BAIL
c9ad936b24
Add mempool check.
...
SVN revision: 36053
2008-09-17 15:23:09 +00:00
Cedric BAIL
f3bab28c36
Fix module stuff to be able to run test in the build directory.
...
SVN revision: 36052
2008-09-17 15:21:16 +00:00
Cedric BAIL
f7d92d57a4
Add statistics, gc support to mempool and a workaround path lookup for module.
...
SVN revision: 36051
2008-09-17 15:20:35 +00:00
Cedric BAIL
0dbb3917b7
We need to return something != NULL.
...
SVN revision: 36050
2008-09-17 15:19:07 +00:00
Cedric BAIL
730049220e
Fix typo and initialization.
...
SVN revision: 36049
2008-09-17 15:18:35 +00:00
Cedric BAIL
84a2279a0a
Remove dead directory.
...
SVN revision: 36048
2008-09-17 15:18:04 +00:00
Cedric BAIL
3bf0d7ed5e
Add protection for dump function also.
...
SVN revision: 36042
2008-09-17 08:59:47 +00:00
Cedric BAIL
eeb52f487a
Fix bug reported by Vincent Torri and add a test to trigger it.
...
SVN revision: 36041
2008-09-17 08:33:35 +00:00
Cedric BAIL
d40ebdca1b
Add real life test from E17 use.
...
SVN revision: 36017
2008-09-16 14:06:14 +00:00
Cedric BAIL
3f59016035
Add Ecore and Evas benchmark.
...
SVN revision: 36015
2008-09-16 13:50:34 +00:00
Vincent Torri
7fd7cc717c
* update the doc of stringshre
...
* fix minor warnings from doxygen
SVN revision: 36004
2008-09-15 19:58:36 +00:00
Vincent Torri
78c9527052
* add documentation. The tutorial needs to be written, though
...
* rename eina_arra_count() to eina_array_count_get() and
eina_arra_get() to eina_array_data_get()
SVN revision: 36003
2008-09-15 19:17:15 +00:00
Cedric BAIL
e3e2afca18
Don't compute string length when not really needed.
...
SVN revision: 36001
2008-09-15 13:38:42 +00:00
Cedric BAIL
1582d52c3c
New stringshare implementation.
...
We use 256 buckets with a rbtree per bucket. The key of rbtree is the hash
on 12bits and each node of the rbtree have a list of string.
Thanks to Gustavo and Vincent for their help.
SVN revision: 36000
2008-09-15 12:54:54 +00:00
Cedric BAIL
e54390798d
Add more test for stringshare.
...
SVN revision: 35999
2008-09-15 12:44:06 +00:00
Cedric BAIL
9979edd82a
Don't limite the range of the hash function. It's the dutty of the caller.
...
SVN revision: 35998
2008-09-15 12:35:27 +00:00
Cedric BAIL
ab37298c12
Include benchmark against Evas and Ecore stringshare.
...
SVN revision: 35995
2008-09-15 09:59:41 +00:00
Vincent Torri
345bddedca
add evas and ecore detection for benchmarking
...
SVN revision: 35969
2008-09-12 21:08:16 +00:00
Cedric BAIL
c52f7b7b62
Make inline only usefull function.
...
Return information about potential error during eina_array_remove.
SVN revision: 35888
2008-09-08 12:19:15 +00:00
Vincent Torri
b73180cd01
* add array doc
...
* eina_array_push() returns now a bool
* fix compilation
SVN revision: 35871
2008-09-07 19:12:49 +00:00
Vincent Torri
557107790a
* add accessor doc
...
* fix and add some links
SVN revision: 35865
2008-09-07 07:19:19 +00:00