forked from enlightenment/efl
evas_gl : Fixed macro substitution bug in evas_gl
In evas_gl_api_ext_def.h there're calls such as: _EVASGL_EXT_DRVNAME(EGL_KHR_image_base) The macro is defined in evas_gl_api_ext.c as: (strstr(glexts, #name) != NULL || strstr(glueexts, #name) != NULL) if (_EVASGL_EXT_CHECK_SUPPORT(name)) *ext_support = 1; But EGL_KHR_image_base is itself a macro, which is defined in EGL/eglext.h like this: Thus, the _EVASGL_EXT_CHECK_SUPPORT macro will unwrap into: (strstr(glexts, "1") != NULL || strstr(glueexts, "1") != NULL) instead of intended: (strstr(glexts, "EGL_KHR_image_base") != NULL || strstr(glueexts, "EGL_KHR_image_base") != NULL) This patch fixes this by applying stringification earlier in _EVASGL_EXT_DRVNAME Bugfix reported by jinhyung.jo@samsung.com
This commit is contained in:
parent
2dc092d36e
commit
90bbc21d02
|
@ -184,13 +184,13 @@ re->info->info.screen);
|
|||
}
|
||||
|
||||
#define _EVASGL_EXT_CHECK_SUPPORT(name) \
|
||||
(strstr(glexts, #name) != NULL || strstr(glueexts, #name) != NULL)
|
||||
(strstr(glexts, name) != NULL || strstr(glueexts, name) != NULL)
|
||||
|
||||
#define _EVASGL_EXT_DISCARD_SUPPORT() \
|
||||
*ext_support = 0;
|
||||
|
||||
#define _EVASGL_EXT_DRVNAME(name) \
|
||||
if (_EVASGL_EXT_CHECK_SUPPORT(name)) *ext_support = 1;
|
||||
if (_EVASGL_EXT_CHECK_SUPPORT(#name)) *ext_support = 1;
|
||||
|
||||
#define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) \
|
||||
{ \
|
||||
|
|
Loading…
Reference in New Issue