Commit Graph

967 Commits

Author SHA1 Message Date
Gustavo Sverzut Barbieri 73b1d45d15 value got the helper, will be useful in other cases as well.
SVN revision: 67518
2012-01-24 22:56:17 +00:00
Gustavo Sverzut Barbieri 73b595df2f more efficient model properties based on struct.
this is a killer, should be very efficient in memory and speed to
set/get items: instead of a hash of properties, keep them in a C
struct!

The constraint is that properties have fixed types defined at compile
time and cannot be deleted, but this is expected in many cases (ie:
esql rows).




SVN revision: 67517
2012-01-24 22:17:57 +00:00
Vincent Torri 1f27f0b581 Eina: update alloca() declaration from latest autoconf doc.
SVN revision: 67483
2012-01-24 07:21:33 +00:00
Vincent Torri 0f16de1de6 Eina: Windows version is managed by Evil, now. I'm not sure I have to update ChangeLog.
SVN revision: 67482
2012-01-24 07:08:23 +00:00
Iván Briano e4178ad8e6 dereference pointer before using
SVN revision: 67479
2012-01-23 16:51:02 +00:00
Vincent Torri 7bc418f30f Eina: remove warning when compiling with mingw-w64
SVN revision: 67447
2012-01-22 12:08:06 +00:00
Vincent Torri f4baf62a91 Eina: DOS2UNIX eina_file_win32.c
SVN revision: 67445
2012-01-22 08:57:50 +00:00
Vincent Torri 54b589cfe9 Eina: remove unused variable
SVN revision: 67444
2012-01-22 08:56:13 +00:00
Vincent Torri 37ccabf61c Eina "Fix" printf conversion format on Windows. printf family on Windows is just plain weirdness
SVN revision: 67443
2012-01-22 08:55:02 +00:00
Vincent Torri 2b932abc9c Eina: formatting
eina_file_init() and eina_file_shutdown() are global symbols, not local ones


SVN revision: 67423
2012-01-21 08:23:23 +00:00
Vincent Torri 9f844d5699 Eina: Windows fixes
add eina_file_path_sanitize() which was missing in the windows port
add locks
synchronize a bit with the linux version


SVN revision: 67422
2012-01-21 08:21:32 +00:00
Vincent Torri 92b7c85e37 alphabetical order
SVN revision: 67421
2012-01-21 08:19:46 +00:00
Gustavo Sverzut Barbieri adf2dcfed9 eina share log refactor.
Don't print messages from share common, that way we have no way to
know where it happens, moreover the binshare values may lack trailing
'\0'.

Also makes no sense to share the log domain. With separate domains we
can be more selective in what we log/debug.



SVN revision: 67418
2012-01-21 07:21:23 +00:00
Gustavo Sverzut Barbieri 8fb1d6e036 eina_model: fix uninitialized bit
SVN revision: 67416
2012-01-21 06:26:32 +00:00
Gustavo Sverzut Barbieri 22e40d2cf7 matrixsparse: fix pointer after it's freed.
SVN revision: 67415
2012-01-21 05:32:39 +00:00
Gustavo Sverzut Barbieri 63a5350974 beef inlist tests wrt safety pointers
SVN revision: 67409
2012-01-21 04:20:32 +00:00
Gustavo Sverzut Barbieri 7c0357ddeb welcome eina_model.
This is a simple to use generic hierarchical data access. It includes
properties, children, reference counting and notifications (callbacks).

It can be understood in the same lines as GObject or PyObject, but I
believe the best usage is just to provide data models, not generic
Object Oriented Programming in C.

It misses most of documentation, although the important bits are
there. Need help here :-/



SVN revision: 67405
2012-01-21 01:30:09 +00:00
Gustavo Sverzut Barbieri fcc86ae34b eina_unicode: add safety checks.
they are not so expensive and will help detect bugs.

also, safety can be disabled at compile time... if performance is so
critical.



SVN revision: 67393
2012-01-20 13:00:01 +00:00
Gustavo Sverzut Barbieri 829c6f58e4 eina_unicode: fix header inclusion.
library files should ALWAYS include config.h, they should not include
Eina.h using "<Eina.h>" to avoid messing with system's version.

Last but definitely not least: include safety checks BEFORE your local
header, otherwise the macros EINA_ARG_NONNULL() will remove every
check for null pointers! eina_safety_checks.h redefines it to empty so
compiler does not optimize these things.



SVN revision: 67392
2012-01-20 12:52:15 +00:00
Sebastian Dransfeld b2193b6fd3 eina: Add FIXME
SVN revision: 67310
2012-01-19 00:36:20 +00:00
Sebastian Dransfeld 8be657aed8 eina: formatting
SVN revision: 67309
2012-01-19 00:36:05 +00:00
Tom Hacohen aeef927046 Eina value: Fixed signed and unsigned comparison.
SVN revision: 67227
2012-01-15 10:32:10 +00:00
Gustavo Sverzut Barbieri 95c845dd5d eina_value: remove left overs.
thanks to stefan_schmidt for spotting it.


SVN revision: 67183
2012-01-13 10:12:16 +00:00
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 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 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 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 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
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 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