Commit Graph

331 Commits

Author SHA1 Message Date
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