Commit Graph

43 Commits

Author SHA1 Message Date
Carsten Haitzler d0ebc2d804 put a general prefix finder in eina.
SVN revision: 58848
2011-04-24 07:35:30 +00:00
Vincent Torri 6e8d19b150 Eina: Add Eina_Lock API
Eina_Lock API is a small set of functions to manage in a
cross platform way mutual exclusion objects



SVN revision: 58835
2011-04-22 21:26:36 +00:00
Cedric BAIL 8b276b36c7 eina: add Eina_Object API.
This API is what could be used by all EFL library for their exposed
type (Evas_Object, Ecore_Timer, Ecore_Animator, Eio_File, ...). The
purpose of Eina_Object is to provide an "obscure" pointer that is
infact an ID with a generation count that will never be dereferenced
directly.
   This provide the benefit of always accessing a living object
with 1/256 chance to being the expected generation of it, that will
always be of the right type.
   It also provide asynchronous repacking ability (still highly
inefficient, but not really hard to improve), simple inheritance
with constructor/destructor and link between object.

All this implementation is highly open for comment, idea, review,
fix and change. I didn't got the time to write a sample test right
now. Maybe will come tomorrow. Same for docs.



SVN revision: 58562
2011-04-11 18:00:34 +00:00
Cedric BAIL 30fda98e76 eina: add Eina_Simple_Xml parser by Gustavo.
TODO: fix docs (but today, eina doc need some love again)
      use iconv and handle encoding (can get entity-to-utf8 from evas)
      description of what to do at :
http://marc.info/?l=enlightenment-devel&m=129975452006699&w=3

NOTE: this mean this API is not stable yet and will be broken soon.


SVN revision: 58387
2011-04-06 10:14:03 +00:00
Lucas De Marchi a95105a888 Implement function to drop priority of current thread
This function is useful for libraries like ecore and evas that have to
set some worker threads. The first thing these threads should do is to
call this function, so the main thread might continue running without
the worker threads interrupting it too much.



SVN revision: 52651
2010-09-23 20:38:48 +00:00
Tom Hacohen 6a0b488468 Eina: Moved the private headers to src/lib where they belong.
SVN revision: 51388
2010-08-19 08:30:01 +00:00
Cedric BAIL 6293bd87fa * eina: fix amalgamation.
SVN revision: 51210
2010-08-16 13:52:34 +00:00
Tom Hacohen 279da003e0 Eina: Added Eina_UStrbuf.
Same as Eina_Strbuf but for Eina_Unicode strings.

SVN revision: 50534
2010-07-27 09:05:41 +00:00
Tom Hacohen 3675a5f02b Eina: Add Eina_UStringshare and Eina_Binshare.
Also modified Eina_Stringshare to share most of the code with the two above.
Added Magics for Eina_UStrbuf as well as for UStringshare/Binshare.

SVN revision: 50533
2010-07-27 08:55:23 +00:00
Tom Hacohen 270f765c91 Eina: Added Eina_Unicode.
SVN revision: 50532
2010-07-27 08:22:20 +00:00
Cedric BAIL 9367b5f7c7 * eina: Add first version of a Quad Tree data type.
NOTE: consider the API experimental and subject to change.


SVN revision: 48424
2010-04-29 17:21:14 +00:00
Gustavo Sverzut Barbieri 08127ecc3e eina_str speedups.
* eina_str_split() now does the minimum number of passes and
   allocations. The first pass figures out the string size (strlen())
   and number of delimiters, so we can allocate the exact number of
   elements in array. The second repeats the loop copying elements to
   string and also setting them to the result array.

 * eina_str_split_full() is a variation of eina_str_split() that
   returns also the number of elements in array, in the case you need
   to pre-allocate another array to copy.

 * eina_strlen_bounded() is introduced to limit strlen() results, this
   is used in has_prefix and has_suffix, but possibly other use cases
   where string must be of a maximum size as we don't do useless
   iterations;



SVN revision: 46547
2010-02-27 03:42:27 +00:00
Gustavo Sverzut Barbieri 191d87d78a eina log level utilities.
couple of functions that are useful outside and should be fast.



SVN revision: 45996
2010-02-09 01:43:58 +00:00
Sebastian Dransfeld 436249c412 Move ecore_str and ecore_strbuf to eina
SVN revision: 45650
2010-01-27 20:47:47 +00:00
Cedric BAIL 7a51d7bf39 * eina: Cleanup Eina fixed point implementation.
SVN revision: 42798
2009-09-29 12:04:50 +00:00
Rafael Antognolli 52de9e33cd Added the Eina_Tile_Grid_Slicer iterator.
This new iterator receives a rectangle as argument and tile_w X tile_h sized
tile, and slices the rectangle iterating over it on each iteration.



SVN revision: 42427
2009-09-11 23:51:47 +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
Cedric BAIL 2bc38ddb92 * eina: Add more FP type (f8p24 and f32p32).
SVN revision: 42124
2009-08-31 13:52:17 +00:00
dieb d7bbc05b12 Initial import of the new eina logging API.
* eina_error might be kept for error messages and codes, but it's logging API
  will be deprecated. For now, it's been kept for not breaking others code and
  for a smoother transition.
* Added test for new logging API, also demonstrates usage.


SVN revision: 41960
2009-08-24 21:43:48 +00:00
Carsten Haitzler d0c5158f5b eina hamster++
<dieb_> weird, undefined refernce to eina_cpu_count
<raster> you have no cpus!
<dieb_> dammit!
<Sachiel> try eina_hamster_count
<dieb_> lo
<raster> oh god
<raster> now u did it
<raster> i have to add that
<dieb_> heheheh



SVN revision: 41727
2009-08-13 00:47:55 +00:00
Cedric BAIL a477424685 * eina: Expose an helper for memory pool as Eina_Trash data type.
SVN revision: 41350
2009-07-15 13:13:52 +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
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
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
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
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
Chidambar Zinnoury 5c2c6049f1 Use includedir instead of prefix/include to install Eina headers.
SVN revision: 37925
2008-12-04 16:25:40 +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
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
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 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 991867bd7b Share eina_benchmark to other libs also.
SVN revision: 35832
2008-09-04 15:06:26 +00:00
Cedric BAIL 9494785cb7 Inline red black tree lookup.
SVN revision: 35716
2008-08-28 14:37:26 +00:00
Cedric BAIL 394c787dde Add Red Black tree API. Right now only insertion, lookup and iterator work.
The current implementation choose to move the node allocation outside of eina
control like eina_inlist. They currently have the same memory footprint as
eina_inlist and the implementation of insertion and lookup are iterative
making it quite fast. This should make them a good competitor of eina_inlist
for eina_hash and eina_stringshare.



SVN revision: 35689
2008-08-27 10:07:12 +00:00
Cedric BAIL 4bc094c45a As we are heavy user of int to string and double to string in the EFL, provide a fast and portable one.
SVN revision: 35604
2008-08-21 14:20:41 +00:00
Cedric BAIL 43cc2dca6f Add first try for an accessor and iterator API, comment welcome (lack inlist and list currently).
Rewrite EINA_ARRAY_ITER_NEXT, still fast, need one more parameter, but no more EINA_ARRAY_ITER_END.


SVN revision: 35438
2008-08-11 16:30:16 +00:00
Cedric BAIL ce23f3c2a9 After benchmarking, providing inline does impact performance of list and array user.
SVN revision: 35406
2008-08-08 14:20:11 +00:00
Cedric BAIL 693f0eca8d Build new API.
SVN revision: 35354
2008-08-06 15:53:03 +00:00
Cedric BAIL e04f59c7b0 Export a magic API.
SVN revision: 35270
2008-07-31 15:08:19 +00:00
Cedric BAIL edce92f017 Add array and cleanup lalloc namespace.
SVN revision: 35257
2008-07-30 16:34:54 +00:00
doursse 16b95f91c9 install headers in $prefix/include/eina-$VERSION_MAJOR to allow parralel
installations between different major versions


SVN revision: 35251
2008-07-30 13:16:09 +00:00
Cedric BAIL 6e74d01030 Adding stringshare from evas inside eina.
SVN revision: 35249
2008-07-30 13:05:13 +00:00
Cedric BAIL a92e3d6c83 Adding turran work to unify EFL data types and functions.
SVN revision: 35248
2008-07-30 12:46:55 +00:00