]
)
+#######################################
+## MAGIC_DEBUG
+want_evas_magic_debug="yes"
+AC_MSG_CHECKING(whether to check magic for evas object)
+AC_ARG_ENABLE(evas-magic-debug,
+ AC_HELP_STRING(
+ [--disable-evas-magic-debug],
+ [disable MAGIC_DEBUG check when people pass in wrong object type. [[default=enabled]]]
+ ),
+ [ want_evas_magic_debug="$enableval" ]
+)
+AC_MSG_RESULT($want_evas_magic_debug)
+
+AM_CONDITIONAL(EVAS_MAGIC_DEBUG, test "x$want_evas_magic_debug" = "xyes")
+if test "x$want_evas_magic_debug" = "xyes"; then
+ AC_DEFINE(EVAS_MAGIC_DEBUG, 1, [complain when peole pass in wrong object types etc.])
+fi
+
#####################################################################
## ARGB engine options
echo " SSE.....................: $build_cpu_sse"
echo " ALTIVEC.................: $build_cpu_altivec"
echo " Thread Support..........: $build_pthreads"
+echo " MAGIC_DEBUG.............: $want_evas_magic_debug"
echo
echo "Async Events..............: $build_async_events"
echo
#define _GNU_SOURCE
#endif
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "Evas.h"
#include "../file/evas_module.h"
#include "../file/evas_path.h"
-
+#ifdef EVAS_MAGIC_DEBUG
/* complain when peole pass in wrong object types etc. */
-#define MAGIC_DEBUG
+# define MAGIC_DEBUG
+#endif
#define RENDER_METHOD_INVALID 0x00000000
#define MAGIC_OBJ_CUSTOM 0x72777775
#ifdef MAGIC_DEBUG
-#define MAGIC_CHECK_FAILED(o, t, m) \
+# define MAGIC_CHECK_FAILED(o, t, m) \
{evas_debug_error(); \
if (!o) evas_debug_input_null(); \
else if (((t *)o)->magic == 0) evas_debug_magic_null(); \
else evas_debug_magic_wrong((m), ((t *)o)->magic); \
}
-#else
-#define MAGIC_CHECK_FAILED(o, t, m)
-#endif
-#define MAGIC_CHECK(o, t, m) \
+# define MAGIC_CHECK(o, t, m) \
{if ((!o) || (!(((t *)o)->magic == (m)))) { \
MAGIC_CHECK_FAILED(o, t, m)
-#define MAGIC_CHECK_END() \
-}}
+# define MAGIC_CHECK_END() }}
+#else
+# define MAGIC_CHECK_FAILED(o, t, m)
+# define MAGIC_CHECK(o, t, m) { if (!o) {
+# define MAGIC_CHECK_END() }}
+#endif
#define NEW_RECT(_r, _x, _y, _w, _h) \
{(_r) = malloc(sizeof(Evas_Rectangle)); \