[glib/nirbheek/gmodule-symbol-uscore: 3/3] meson: Explicitly use G_MODULE_IMPL_NONE instead of 0
- From: Nirbheek Chauhan <nirbheekc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/nirbheek/gmodule-symbol-uscore: 3/3] meson: Explicitly use G_MODULE_IMPL_NONE instead of 0
- Date: Sat, 13 Jul 2019 07:00:40 +0000 (UTC)
commit 23ea5e4be1b1bd6022fe618fbb950326b81d8d2b
Author: Nirbheek Chauhan <nirbheek centricular com>
Date: Sat Jul 13 11:39:59 2019 +0530
meson: Explicitly use G_MODULE_IMPL_NONE instead of 0
This is much clearer than using a contextless number.
gmodule/meson.build | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gmodule/meson.build b/gmodule/meson.build
index ee54832b0..b360b1c0f 100644
--- a/gmodule/meson.build
+++ b/gmodule/meson.build
@@ -6,7 +6,8 @@ g_module_have_dlerror = false
libdl_dep = [ ]
g_module_lib_args = [ ]
-g_module_impl = ''
+g_module_impl = 'G_MODULE_IMPL_NONE'
+g_module_supported = false
# Check whether we need preceding underscores
g_module_need_uscore = cc.symbols_have_underscore_prefix()
@@ -36,13 +37,14 @@ if g_module_impl == 'G_MODULE_IMPL_DL' and cc.has_function('dlerror', args : g_m
endif
# Done, have we got an implementation?
-if g_module_impl == ''
- g_module_impl = '0'
+if g_module_impl == 'G_MODULE_IMPL_NONE'
message('WARNING: No suitable GModule implementation found!')
+else
+ g_module_supported = true
endif
gmoduleconf_conf.set('G_MODULE_IMPL', g_module_impl)
-gmoduleconf_conf.set10('G_MODULE_SUPPORTED', g_module_impl != '0')
+gmoduleconf_conf.set10('G_MODULE_SUPPORTED', g_module_supported)
gmoduleconf_conf.set10('G_MODULE_HAVE_DLERROR', g_module_have_dlerror)
gmoduleconf_conf.set10('G_MODULE_NEED_USCORE', g_module_need_uscore)
gmoduleconf_conf.set10('G_MODULE_BROKEN_RTLD_GLOBAL', g_module_broken_rtld_global)
@@ -76,7 +78,7 @@ libgmodule = library('gmodule-2.0',
link_args : [glib_link_flags],
)
-supported_var = 'gmodule_supported=@0@'.format(g_module_impl != '0')
+supported_var = 'gmodule_supported=@0@'.format(g_module_supported)
pkg.generate(libgmodule,
libraries : [thread_dep],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]