2 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include "efl_assist.h"
19 #include "efl_assist_private.h"
21 /*===========================================================================*
23 *===========================================================================*/
26 _magic_string_get(ea_magic m)
30 return "None (Freed Object)";
32 case EA_MAGIC_CUTLINK:
40 __CONSTRUCTOR__ static void
45 __DESTRUCTOR__ static void
51 /*===========================================================================*
53 *===========================================================================*/
56 _ea_magic_fail(const void *d, ea_magic m, ea_magic req_m, const char *fname)
58 LOGE("\n*** MAGIC FAIL (%s) ***\n", fname);
61 LOGE(" Input handle pointer is NULL!");
62 else if (m == EA_MAGIC_NONE)
63 LOGE(" Input handle has already been freed!");
65 LOGE(" Input handle is wrong type\n"
66 " Expected: %08x - %s\n"
67 " Supplied: %08x - %s",
68 (unsigned int)req_m, _magic_string_get(req_m),
69 (unsigned int)m, _magic_string_get(m));
71 if (getenv("EA_ERROR_ABORT")) abort();
74 /*===========================================================================*
76 *===========================================================================*/