check returned value
* src/bin/evil_test_memcpy.c:
define getpagesize() for vc++
* src/lib/evil_unistd.c:
move inclusion of time.h after windsock2.h
include direct.h for vc++
use _WIN32_WCE for Windows CE compilers in evil_getcwd()
* src/lib/Evil.h:
* src/lib/evil_unistd.h:
move getcwd() define from Evil.h to evil_unistd.h
add some C99 types to Evil.h for vc++ (will be used in eina)
* src/lib/evil_fcntl.c:
include io.h for vc++
* src/lib/evil_link_xp.cpp:
use full name for symlink(). Fix symlink on Windows XP with
the DOS prompt or the debugger of Visual Studio.
* src/lib/evil_mman.c:
don't include unistd.h if vc++ is used
* src/lib/evil_stdio.h:
formatting
* src/lib/evil_stdlib.h:
* src/lib/evil_stdlib.c:
define putenv only for mingw32ce
move the returned value of setenv()
SVN revision: 38333
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
this should help with optimizations and code correctness, please see
"info gcc" for detailed explanation on these.
if you experience some functions not working as expected, please
double check if they're not marked with EINA_PURE or EINA_CONST, maybe
I misused them. Remove the macro and try again.
brief explanation:
* EINA_WARN_UNUSED_RESULT: if you forgot to use the return of some
function, it will emit a warning (and -Werror will make it an
error). This way it will be harder to miss the attribution
"l = eina_list_append(l, v)".
* EINA_ARG_NONNULL(index, index...): if you give it an explicit NULL
argument, or some tool (ie: clang) finds it could get a NULL but
this is not accepted by API, then a warning will be emitted. This
will help those that still use eina_hash_add() as if it is
evas_hash_add().
* EINA_MALLOC: any non-NULL pointer it returns cannot alias any other
pointer valid when function returns.
* EINA_PURE: function have no effects other than the return and this
return just depend on parameters and/or globals. You might call
this function in a loop a thousand times and it will return the
same value, thus you may move this function outside the loop and
remove it.
* EINA_CONST: stricter version of EINA_PURE, it will not check for
global parameters, that is, you cannot consider pointer
arguments. Use it for math things like "int sqrt(int)".
* EINA_PRINTF(fmt, arg): will check format parameter specified in
position "fmt" and passed arguments starting at position "arg", it
will check for things like giving integers where short or strings
were expected.
* EINA_SCANF(fmt, arg): similar to eina_printf().
* EINA_FORMAT(fmt): for use with things like dgettext(), it will get
a printf-like format string and modifies it.
Please review and test it with your software, make sure you make clean
before you install the new version so it has any effect.
If you find some functions are missing EINA_WARN_UNUSED_RESULT and
EINA_ARG_NONNULL or others, please add them.
SVN revision: 38323
1 - use inlist as regular list uses non-thread safe mempool;
2 - lock around image loading, so if main thread requests pixels right
before worker thread is loading them, you don't get ie->info.module
to NULL while it would be used (triggered from engines/common).
Maybe this should be handled by a global mutex elsewhere instead of
per-image mutex, but it has more granularity now.
3 - emit "preloaded" callback if it was canceled to be loaded from main
thread.
Please someone review these changes.
SVN revision: 38312
image preload will use modules from threads, there is a possibility to
crash due wrong reference counting.
actually much more can fail, we need to check modules don't keep that
needs exclusive access in globals or per-Evas_Module, but that's
another issue.
TODO: replace spinlocks with atomic operations.
SVN revision: 38309
We had some problems with preload and after running LLVM's CLang
Static Analyser we found out that current->target could be NULL after
loop.
Also fixed some GCC and CLang warnings, kudos to these wonderful tools
that "Saved The Day".
PS: we should put some CLang Static Analyser results so others can
help fix other parts of E.
SVN revision: 38293
fix fullscreen
* ecore_evas_win32.c:
add fullscreen (d3d and ddraw) and shape (d3d) support
minor formatting
* configure.ac:
enable direct3d support
SVN revision: 38248
ecore_evas_list_engines and geometry_parse, they're used in almost all
applications using ecore_getopt, let's avoid replicating code.
SVN revision: 38247
evas_object_image_preload() should not use object as const because it
will mdofiy the object state (so it's semantic makes more sense).
if data was already loaded, then callback before ignored it (return).
SVN revision: 38246
fast direct3d engine written by Dmitriy Mazovka. You rock !
* m4/evas_check_engine.m:
* m4/evas_check_loader.m4:
use m4_popdef for each macro (otherwise, fail if aclocal is too old)
* src/lib/canvas/evas_font_dir.c:
include evas_common.h and evas_private.h after Eet.h and Evil.h
so that EAPI is correctly defined
SVN revision: 38244
if image was already preloaded, inform user.
regular use case is to have image hidden, ask for preload and then
show image on callback, if there is no callback, image is never shown.
SVN revision: 38236
But is so big i fear i could have broken some piece of code. So report any wrong
behaviour to me (cedric on #edevelop).
So moving e17 and efreet to eina_hash. With a little efreet API break so they
must come together.
SVN revision: 38185
as reported, elicity triggers an infinite loop by calling
edje_object_part_geometry_get(), which in turns calls
_edje_recalc_do() which in turns calls the elicit code that requests
edje_object_part_geometry_get() and since it's still marked as
"dirty", it enters the loop...
the real fix is just the move of ed->dirty = 0; before calling
recalcs, but I also unmarked object as need_recalculate so we can even
avoid requesting object to recalculate from evas.
SVN revision: 38139
* src/bin/evil_test_gettimeofday.c:
fix unit test; now all tests pass, finally
* src/lib/evil_unistd.c:
fix gettimeofday() on mingw32ce
SVN revision: 38130
* src/bin/evil_test_dlfcn.c:
* src/bin/evil_test_dlfcn.h:
add dflcn unit test
* src/bin/evil_suite.c:
show result of the unit tests and add dlfcn unit test
* src/bin/evil_test_environment.c:
remove debug
* src/bin/evil_test_gettimeofday.c:
debug, not working yet :/
* src/bin/evil_test_link.c:
* src/lib/evil_link_ce.c:
fix link support on Windows CE
SVN revision: 38126
Wow, this was tricky to find since it is hard to trigger, thanks to
Canola complex edje files we could spot it!
In some cases we end with object being marked as dirty while
calculating its state (ie: edje), then we need to run smart calculate
again.
This has a drawback however: we cannot check for need_recalculate()
inside smart calculate anymore, we must assume it is only called if
the flag is set. To avoid that we could mark a shadow member and use
that or use a counter, that has the problem of using more data.
SVN revision: 38108
give the possibility to write small code like :
it = eina_hash_iterator_tuple_new(hash);
eina_iterator_foreach(it, do_something_cb, NULL);
eina_iterator_free(it);
If hash is empty, but valid it will return a NULL iterator for this
example.
SVN revision: 38104
Eina hash api must get non NULL pointer allocated with
eina_hash_new(), but Evas hash started with NULL and would allocate
and destroy the hash as required by operations.
To do a proper wrapper we must ensure we don't call Eina hash API with
NULL, we must handle that outside Eina.
PLEASE do not remove this code again (it's the second time I add it),
this is the correct approach. Other than that is going after evas_hash
usage and converting directly to eina_hash.
SVN revision: 38091
Unset value is now 0x0 and this is handled as invalid, with an error message.
1x1 is a valid fill, but it is very slow and often system hangs while
it scale the whole thing... usually nobody want it at 1x1, we just end
using that for unset values. With unset value at 0x0 it will not
happen and we'll know when we forgot to do so!.
SVN revision: 38071
add output
* src/bin/evil_test_link.c:
add a unit test for readlink()
* src/lib/evil_link_xp.cpp:
fix readlink() and symlink() on Windows XP
SVN revision: 38070
destroyed by _edje_cache_coll_unref. So moving the call to _edje_cache_coll_unref
after the last use of Edje_Real_Part should be better.
SVN revision: 38020
* evas: if we automatically destroy hash, check for NULL before
handling it to eina api, which expect elements to be created with
eina_hash_new() and thus will fail on NULL.
* eina: add magic checking for eina_hash and eina_hash_iterator, this will
help spot when NULL is used.
* eina_hash_foreach: do not try to create the iterator if hash is NULL.
SVN revision: 37982