Commit Graph

1481 Commits

Author SHA1 Message Date
Gustavo Sverzut Barbieri b1feb2fe8c eina_value: add struct type.
efficient storage with named access, can specify compare, alloc, free
and other operations for even better management.

no changelog/news as this is under eina_value, all new for 1.2 release.



SVN revision: 67155
2012-01-12 22:58:31 +00:00
Gustavo Sverzut Barbieri 32392d38f8 eina_value_blob: nicer convertion from string, array and blob.
SVN revision: 67154
2012-01-12 19:39:16 +00:00
Gustavo Sverzut Barbieri c486211f59 eina_value: simpler and faster code using newer eina_inarray_alloc_at()
SVN revision: 67153
2012-01-12 19:16:46 +00:00
Gustavo Sverzut Barbieri 72d4da0022 eina_inarray: add useful function to open space in array.
no changelog or news as eina_inarray is new and this is already stated
in these files.



SVN revision: 67152
2012-01-12 19:08:26 +00:00
Gustavo Sverzut Barbieri 9d424b133b eina_value: use mempool.
thanks to discomfitor about the tip.



SVN revision: 67151
2012-01-12 18:50:43 +00:00
Gustavo Sverzut Barbieri 90e2259b6f eina_value: improve docs and add blob operations helper.
SVN revision: 67149
2012-01-12 17:45:51 +00:00
Gustavo Sverzut Barbieri 9459b0294d eina_value: improve docs a bit
SVN revision: 67148
2012-01-12 17:35:50 +00:00
Gustavo Sverzut Barbieri 9214ac6015 eina_value: hash now adopts given Eina_Hash.
This should allow users to setup the hash manually, in an efficient
way, then make it an Eina_Value.



SVN revision: 67147
2012-01-12 17:27:53 +00:00
Gustavo Sverzut Barbieri 47b08d1a16 eina_value: list now adopts given Eina_List.
This should allow users to setup the array manually, in an efficient
way, then make it an Eina_Value.


SVN revision: 67146
2012-01-12 17:15:49 +00:00
Gustavo Sverzut Barbieri d5de2617e0 eina_value: array now adopts given Eina_Inarray.
This should allow users to setup the array manually, in an efficient
way, then make it an Eina_Value.



SVN revision: 67145
2012-01-12 17:07:07 +00:00
Gustavo Sverzut Barbieri bf29583354 eina_value: replace non-posix timercmp() with manual comparison.
SVN revision: 67144
2012-01-12 16:48:54 +00:00
Gustavo Sverzut Barbieri 70478893fe eina_value: add missing @since.
SVN revision: 67143
2012-01-12 16:38:53 +00:00
Mike Blumenkrantz b9ec187bb9 fix docs for first half of eina_value: the second half caused me to start drinking heavily
SVN revision: 67112
2012-01-12 03:21:52 +00:00
Gustavo Sverzut Barbieri 113d35f6da eina_value: add blob type.
Nice type that even supports configurable operations such as compare,
free, copy and to_string.

the usual is also supported: provide no ops (operations) and memory
will be left untouched.

nice feature to dump as string :-)



SVN revision: 67109
2012-01-12 03:00:03 +00:00
Gustavo Sverzut Barbieri ed2183c146 missing file.
my bad...


SVN revision: 67108
2012-01-12 02:56:56 +00:00
Gustavo Sverzut Barbieri a125108ebe eina_value: add struct timeval.
may be useful for esskyuehl.



SVN revision: 67106
2012-01-12 01:31:21 +00:00
Gustavo Sverzut Barbieri 3d701ab72f fix C++ compile, add test.
adding a dummy test so we (read: myself ;-)) remember to compile with
c++ and check errors like missing casts.



SVN revision: 67105
2012-01-12 00:24:22 +00:00
Gustavo Sverzut Barbieri 4e74c624d8 eina_value: add hash.
Similar to list and array, but takes string keys instead of position.

It can convert to string, I've added tests for it, but hash algorithm
changes may break the simple comparison I did... and I don't want to
parse the string to be more accurate.



SVN revision: 67103
2012-01-11 23:54:35 +00:00
Gustavo Sverzut Barbieri 0b2ddbd396 eina_value: revert bogus array change, add test.
oops! the list commit changed array back! I blame svn not having "git add -p"
and I have to do it by coping files :-/



SVN revision: 67097
2012-01-11 21:55:48 +00:00
Gustavo Sverzut Barbieri 16c03cc014 eina_value: add list type.
Similar to array, but less efficient as uses list nodes. If possible
values are stored on list->data itself, otherwise they are allocated
and the pointer goes as list->data.



SVN revision: 67096
2012-01-11 21:52:32 +00:00
Gustavo Sverzut Barbieri b7539c2ad0 eina_value: convert array to string using [] for single items as well.
SVN revision: 67095
2012-01-11 21:50:40 +00:00
Gustavo Sverzut Barbieri e8710d035b eina_value: fix error condition handling.
SVN revision: 67094
2012-01-11 21:34:49 +00:00
Gustavo Sverzut Barbieri 5e94a82fab eina_value: optimize detection of basic types.
SVN revision: 67090
2012-01-11 19:46:55 +00:00
Gustavo Sverzut Barbieri 25c6251caa proper include of alloca.h, thanks vtorri for spotting it.
SVN revision: 67084
2012-01-11 14:19:51 +00:00
Cedric BAIL ebbf531b63 eina: massiv fix for Eina_Value.
Should be more portable and work with C++.

NOTE: I still see an aliasing break in eina_value_pset, but wasn't
able to figure how to solve it.


SVN revision: 67065
2012-01-11 10:37:13 +00:00
Daniel Juyung Seo 192290dfe9 eina eina_list.h: Refined documentation.
SVN revision: 67041
2012-01-11 06:41:04 +00:00
Gustavo Sverzut Barbieri 7a4e904566 add eina_value.
eina value is a generic value storage, it's quite efficient to space
(16 bytes) and speed (inlines for basic types).

It's basically a structure describing how to manage memory
(Eina_Value_Type), with default implementation for char, short, int,
long, int64_t (and unsigned variants), float, double, stringshare and
string.

If a type 'value_size' is smaller than 8 bytes, it's stored
inline. Otherwise a value is allocated and managed.

Most of the methods are inline, with special handling for char, short,
int... Then no extra calls are made, allowing the compiler to optimize
them.

For array of a single type it is recommend to use Eina_Value_Array, as
it will efficiently store and access members (just a char if subtype
is EINA_VALUE_TYPE_CHAR, etc).

It can copy itself, compare itself. Including arrays.

It would be nice to have something that converts between EET and this.



SVN revision: 67035
2012-01-11 02:20:26 +00:00
Daniel Juyung Seo 37b1cde295 eina: applied eina_array_count_get -> eina_array_count api change.
SVN revision: 67021
2012-01-10 15:34:48 +00:00
Gustavo Sverzut Barbieri c567b1cb20 add missing @since before vtorri notices it
SVN revision: 67005
2012-01-10 00:23:24 +00:00
Gustavo Sverzut Barbieri 45b07ed02d add eina_inarray.
It is an inline array, that is, the members are actually in the
allocated buffer, as opposed to a pointer to its data.

It can be used to manage array of integers, floats or other structures
without fragmenting memory.

The lookups should be fast as memory is linear, then CPU prefetch can
kick in and bring data to cache before it's used.



SVN revision: 67003
2012-01-09 23:24:18 +00:00
Gustavo Sverzut Barbieri 2046694051 magic: define and set eina_error if fails.
SVN revision: 67002
2012-01-09 23:14:04 +00:00
Gustavo Sverzut Barbieri 398bf0ee45 Add eina_array_count(), deprecate eina_array_count_get().
This makes the API more uniform.



SVN revision: 67001
2012-01-09 23:13:06 +00:00
Cedric BAIL 682ebd0f02 eina: fix build without Xattr.
SVN revision: 66864
2012-01-04 09:41:15 +00:00
Cedric BAIL a1f2535799 eina: warning--.
SVN revision: 66801
2012-01-03 15:24:15 +00:00
Cedric BAIL edbee63134 eina: detect fault during Eina_File mmap memory access and improve Xattr functions.
SVN revision: 66799
2012-01-03 14:59:07 +00:00
Cedric BAIL fa3ca325d3 eina: let eina_hash_free behave like free.
SVN revision: 66694
2011-12-30 13:41:37 +00:00
Cedric BAIL d92a903ffe eina: add Eina_Semaphore API.
Patch by Vincent Torri.


SVN revision: 66693
2011-12-30 13:38:53 +00:00
Cedric BAIL 8c21aa666d eina: let eina_hash_free() behave like free().
SVN revision: 66636
2011-12-29 14:06:33 +00:00
Cedric BAIL feefe8178a eina: got to aggressive on that one.
SVN revision: 66603
2011-12-28 15:01:13 +00:00
Cedric BAIL 30ba201d49 eina: this arg could really be NULL and really simplify our code.
SVN revision: 66601
2011-12-28 14:55:19 +00:00
Iván Briano e421ac90b7 Don't override standard variables, it looks weird. In turn, fix building with automake 1.11.2
SVN revision: 66599
2011-12-28 14:13:30 +00:00
Chidambar Zinnoury b33c67ff9f eina: indent.
SVN revision: 66595
2011-12-28 09:42:40 +00:00
Cedric BAIL ae86b8203f eina: reorder init as eina_error need eina_stringshare.
SVN revision: 66383
2011-12-20 11:00:59 +00:00
Cedric BAIL caebf5cf95 eina: use WRN for warning.
SVN revision: 66029
2011-12-08 13:28:32 +00:00
Tom Hacohen 66b3c08aff Eina bin/(u)strbuf: Added eina_*buf_manage_new_length.
Same as eina_*buf_manage_new except for the length parameter.

SVN revision: 66028
2011-12-08 13:10:57 +00:00
Mike Blumenkrantz 66792e4a85 fix some format string errors
SVN revision: 66016
2011-12-08 04:21:25 +00:00
Mike Blumenkrantz 6b67e93891 fix shadow var warning
SVN revision: 66014
2011-12-08 04:18:12 +00:00
Mike Blumenkrantz 8ada55917a fix eina_log*level_check() to return the value that the docs claim will be returned
how did nobody catch this sooner?


SVN revision: 66013
2011-12-08 04:11:54 +00:00
Mike Blumenkrantz a200550466 update docs for eina_file_dir_list
SVN revision: 65997
2011-12-07 22:50:50 +00:00
Vincent Torri 4036add6ad Eina: missing 'static inline'
SVN revision: 65992
2011-12-07 20:28:56 +00:00
Vincent Torri 2c85cff20b Eina: improve a bit the doc
SVN revision: 65987
2011-12-07 12:07:18 +00:00
Carsten Haitzler 58040ce94b NO! you break api. you made my e sit here with a segv in a getenv.
because now many libraries and api's don't have prototyopes for
malloc/calloc and much more and this goes horribly wrong especially on
64bit! the eina headers have provided these includes historically and
removing them is a BREAK in api. apps that used to compile and run
just fine now don't. it's unacceptable to break api.

i'm stuck here in unity for crying out loud! this deservves a big FAT
REVERT for that! :-P



SVN revision: 65983
2011-12-07 01:10:43 +00:00
Cedric BAIL a285a94120 eina: the new endless story of fixing header in all possible configuration.
SVN revision: 65974
2011-12-06 21:33:39 +00:00
Cedric BAIL 05827596b6 eina: last header fix.
SVN revision: 65970
2011-12-06 17:05:14 +00:00
Cedric BAIL 2ca68a95c6 eina: fix system header usage.
SVN revision: 65969
2011-12-06 16:57:28 +00:00
Cedric BAIL ca6d71618b eina: move clist around as needed.
SVN revision: 65968
2011-12-06 16:55:50 +00:00
Cedric BAIL 98ced4dd20 eina: only include system header as necessary.
SVN revision: 65966
2011-12-06 16:09:56 +00:00
Cedric BAIL 0d4c616dc5 eina: follow Vincent advice.
SVN revision: 65905
2011-12-05 14:25:25 +00:00
Cedric BAIL a6d8ebc55d eina: disable log if fnmatch is not present.
NOTE: would be better to have an explicit --disable option I think.


SVN revision: 65901
2011-12-05 13:58:09 +00:00
Cedric BAIL 1561954c05 eina: improve system header detection.
SVN revision: 65900
2011-12-05 13:57:10 +00:00
Joerg Sonnenberger 30af9a785f From: Joerg Sonnenberger <joerg@britannica.bec.de>
Subject: [E-devel] eina 1.1.0beta patches for/from pkgsrc

Several patches to fix warnings and potential on netbsd/solaris. minor
so i think i'll skip changelog for this.



SVN revision: 65898
2011-12-05 10:17:57 +00:00
Mike Blumenkrantz 323cd79c4c unfrenchify mempool docs
SVN revision: 65822
2011-12-02 15:34:11 +00:00
Mike Blumenkrantz afdbaf8651 +eina_mempool_calloc
SVN revision: 65821
2011-12-02 15:27:35 +00:00
Daniel Juyung Seo cb771bb445 eina eina_str.h: Fixed documentation typo.
SVN revision: 65711
2011-11-30 07:44:36 +00:00
Cedric BAIL 74e8fac021 eina: remove warning when building without siginfo_t.
SVN revision: 65437
2011-11-20 14:03:09 +00:00
Cedric BAIL c89e2ea21f eina: module don't need dirent.h anymore.
SVN revision: 65340
2011-11-17 11:18:12 +00:00
Cedric BAIL e672dceee2 eina: shutup warning when thread are disabled.
SVN revision: 65339
2011-11-17 11:15:54 +00:00
Cedric BAIL 8bc845b84b eina: remove useless include.
NOTE: I don't know why it was there, but it shouldn't.
Please report any build issue you encounter.


SVN revision: 65291
2011-11-16 10:13:24 +00:00
Vincent Torri 5e673a311f Eina: warning--
patch by Fabien Romano from OpenBSD


SVN revision: 65206
2011-11-14 22:08:02 +00:00
Vincent Torri 13261e2909 whitespace--
SVN revision: 65202
2011-11-14 21:37:42 +00:00
Vincent Torri c251d486dc Eina: Fix warning
Patch by Fabien Romano


SVN revision: 65201
2011-11-14 21:37:25 +00:00
Boris Faure 37efd502fe eina: add murmur3 hash
SVN revision: 65017
2011-11-10 10:58:19 +00:00
Carsten Haitzler 1410e0e3b6 fix clang complaint:
http://dev.enlightenment.fr/~discomfitor/eina-2011-11-08/report-izvfa3.html#EndPath



SVN revision: 64973
2011-11-09 07:15:48 +00:00
Carsten Haitzler 0c778a4205 another spacing baddie -> fixed
SVN revision: 64972
2011-11-09 06:35:45 +00:00
Carsten Haitzler 40ecca4ce6 remove errant space.
SVN revision: 64971
2011-11-09 06:34:03 +00:00
Youness Alaoui 187f4eee8b Eina: Port eina to the Ps3 by including Escape
SVN revision: 64778
2011-11-05 17:49:30 +00:00
Cedric BAIL 6d9d15423a eina: don't hide symbol if we can build them in.
SVN revision: 64762
2011-11-05 14:01:18 +00:00
Vincent Torri fad8b29ec1 whitespace--
SVN revision: 64590
2011-10-31 23:45:22 +00:00
Vincent Torri a9c800a110 Eina: init TLS key...
SVN revision: 64589
2011-10-31 23:45:07 +00:00
Youness Alaoui 78268b076f Eina: Add Eina_TLS typedefs for win32 and void
SVN revision: 64583
2011-10-31 20:44:55 +00:00
Cedric BAIL e40386c4f9 eina: fallback for case where file system doesn't handle MAP_HUGETLB properly.
SVN revision: 64181
2011-10-19 16:09:14 +00:00
ChunEon Park 07e6862922 eina/stringshare - get rid of white space
SVN revision: 64165
2011-10-19 08:36:42 +00:00
Sung W. Park fef1dc318f From: "Sung W. Park" <sungwoo@gmail.com>
"... I've created a resource context per thread using TLS.  Since there is no
TLS support in Eina, I've added 4 APIs for that as well.  Another patch has
been submitted but i'll just include it in here as well. ..."
   


SVN revision: 64120
2011-10-17 05:06:01 +00:00
Boris Faure 0d53d91b67 eina: add eina_strbuf_trim/rtrim/ltrim()
SVN revision: 64098
2011-10-15 12:56:27 +00:00
Mike McCormack 3e0c2d16dc eina: Hook clist into the top level documentation
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 64039
2011-10-13 07:30:34 +00:00
Mike McCormack 8ab7dd7390 eina: Document Eina_Clist
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 64038
2011-10-13 07:06:54 +00:00
Mike McCormack f7d3373df8 eina: Fix bug in eina_clist_element_init
Thanks to Naruto TAKAHASHI for pointing out the problem.

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 64037
2011-10-13 07:06:44 +00:00
Mike McCormack ff34e5a0a9 eina: Add eina_clist_element_is_linked()
Allows checking whether an entry is linked or not.

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 64029
2011-10-13 02:22:18 +00:00
Mike McCormack dd51737725 eina: Add Eina_Clist
A clist is an inlist with the following features:

 - allows removal of items without knowing which list they are in.
 - Two pointers per list item & list head

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 64007
2011-10-12 04:39:27 +00:00
Carsten Haitzler 4364c5720c fd leak --
SVN revision: 63914
2011-10-07 17:47:55 +00:00
Mike McCormack 3331e39a8f eina: Only declare _eina_tracking_lock with thread debugging
Hopefully fixes compilation on windows

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 63905
2011-10-07 05:56:51 +00:00
Mike McCormack d1bfb51324 Revert "[Eina] Use Eina_Lock and not pthread. Fix compilation on Windows."
SVN revision: 63877

Reverted due to the following build failure:

eina_main.c:117:16: error: conflicting types for ‘_eina_tracking_lock’
../../src/include/eina_inline_lock_posix.x:83:29: note: previous declaration of ‘_eina_tracking_lock’ was here
make[3]: *** [libeina_la-eina_main.lo] Error 1

_eina_tracking_lock is used for implementation of Eina_Locks, so cannot be an Eina_Lock

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 63904
2011-10-07 05:56:43 +00:00
Vincent Torri 32c2ed673b [Eina] Use Eina_Lock and not pthread. Fix compilation on Windows.
SVN revision: 63877
2011-10-06 06:34:39 +00:00
Boris Faure 3e2c4c377e eina: fix r63811
SVN revision: 63846
2011-10-05 21:09:10 +00:00
Gustavo Sverzut Barbieri 6ecdda5121 eina: remove couple of warnings
SVN revision: 63842
2011-10-05 20:00:29 +00:00
Vincent Torri 39f6f85798 fir leak in an example. patch by Guillaume 'Kuri' Friloux
SVN revision: 63841
2011-10-05 14:29:40 +00:00
Boris Faure e708e12fa9 eina: eina_strbuf_append_length(sb, s, 0) is possible
also fix typo in doc, remove a trailing space and myself to authors

SVN revision: 63811
2011-10-04 20:47:15 +00:00
Cedric BAIL a8d945f0a6 eina: actually sanitize all file inserted in the cache.
SVN revision: 63789
2011-10-04 02:33:45 +00:00
Cedric BAIL 7efc00819a eina: prevent ABI break when turning on/off threads debugging.
SVN revision: 63788
2011-10-04 02:33:00 +00:00
Cedric BAIL d1999e9125 eina: add sub-second resolution correctness.
SVN revision: 63787
2011-10-04 02:04:40 +00:00