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