Increment in steps linearly instead of doubling them, otherwise it
will get to maximum limit of 4096 too soon.
Also replace the loop with simple math.
SVN revision: 46585
Some of them were working because they were inline, so the compiler
would know an just ignore the flag.
For lists and rbtree there is no problem as after each operation we
must change the pointer to the new head, thus the compiler will
consider it changed.
SVN revision: 46583
I forgot that EINA_CONST refer to the pointer itself, not to its
contents, as such the pointer did not changed, so gcc was optimizing
subsequent fetches of the value.
There should be another optimization to check for this... but then I
guess it's just c++
SVN revision: 46580
If file changed on disc (mtime), then make the reference dangling so
it is not reused anymore on subsequent open. If it is in cache, just
free it as it is not useful anymore.
This solves the following problem:
edje_object_file_set(ed, path, group);
ecore_file_cp(new_gen_file, path);
edje_object_file_set(ed, path, group); /* still uses the old one! */
By: Bruno Dilly <bdilly@profusion.mobi>
SVN revision: 46548
* 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
Use strtod() and avoid couple of walks. Of course the walks were quite
small and it will not bring noticeable improvements, but code is
smaller and easier to read, so why not?
SVN revision: 46530
keep tag and replacement size, compare it before doing strcmp() and
return the size so further calculations use it (eina_strbuf_append()
-> eina_strbuf_append_length())
SVN revision: 46529
These are deprecated and will be killed in short time, stop using them!
Recommendations:
* ecore-txt: use eina_str_convert, drop in replacement, just sed.
* ecore-config: convert your code to use eet + Eet_Data_Descriptors
directly, it is simpler and faster, but requires you to change your
code. Consider using eet_data_descriptor_file_new() and
eet_eina_file_data_descriptor_class_set() or
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(). Then describe your type
with EET_DATA_DESCRIPTOR_ADD_*().
SVN revision: 46494
this will have compilers to completely compile out log statements
using levels greater than the given number.
this is defined in config.h, thus C files should include this before
including Eina.h, as should be the case for all files (IOW: if it does
not work for some file, that file already have a bug).
SVN revision: 46482