typedef struct _Eo_Op_Description
{
- void *api_func; /**< The EAPI function offering this op. */
-#ifdef _WIN32
- const char *api_name; /**< Full name of this API entry-point. Used to work around import indirection in DLL's. */
-#endif
+ void *api_func; /**< The EAPI function offering this op. (The name of the func on windows) */
void *func; /**< The static function to call for the op. */
Eo_Op op; /**< The op. */
Eo_Op_Type op_type; /**< The type of the Op. */
if (Hook) \
Hook(___call.klass, ___call.obj, FuncName, ___call.func, __VA_ARGS__);
-#ifdef _WIN32
-#define EO_FUNC_COMMON_OP_FUNC(Name) ((const void *) #Name)
+#ifndef _WIN32
+# define EO_FUNC_COMMON_OP_FUNC(Name) ((const void *) Name)
#else
-#define EO_FUNC_COMMON_OP_FUNC(Name) ((const void *) Name)
+# define EO_FUNC_COMMON_OP_FUNC(Name) ((const void *) #Name)
#endif
// cache OP id, get real fct and object data then do the call
#ifndef _WIN32
# define _EO_OP_API_ENTRY(a) a
#else
-# define _EO_OP_API_ENTRY(a) a, #a
+# define _EO_OP_API_ENTRY(a) #a
#endif
#define EO_OP_FUNC(_api, _private) { _EO_OP_API_ENTRY(_api), _private, EO_NOOP, EO_OP_TYPE_REGULAR }
return op_desc;
}
#else
- const char *api_name = api_func; /* We put it here on windows. */
/* On Windows, DLL API's will be exported using the dllexport flag.
* When used by another library or executable, they will be declared
* using the dllimport flag. What happens really is that two symbols are
*/
for (unsigned int i = 0; i < cur_klass->desc->ops.count; i++)
{
- if (api_name && !strcmp(api_name, op_descs[i].api_name))
+ if (((op_descs[i].api_func != NULL) && (op_descs[i].api_func != ((void (*)())-1))) &&
+ (api_func && !strcmp(api_func, op_descs[i].api_func)))
{
- if (op_descs[i].api_func == NULL || op_descs[i].api_func == ((void (*)())-1))
- break;
return &op_descs[i];
}
}
}
else if (op_desc->op == EO_OP_OVERRIDE)
{
-#ifdef _WIN32
- api_desc = _eo_api_desc_get(op_desc->api_name, klass->parent, klass->extensions);
-#else
api_desc = _eo_api_desc_get(op_desc->api_func, klass->parent, klass->extensions);
-#endif
if (api_desc == NULL)
{