[Spice-devel] [PATCH spice-gtk 1/3] meson: Use underscorify() instead of split()

Eduardo Lima (Etrunko) etrunko at redhat.com
Thu Sep 27 14:26:58 UTC 2018


Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
---
 meson.build | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 48f5f74..4e4bee8 100644
--- a/meson.build
+++ b/meson.build
@@ -368,14 +368,12 @@ endif
 #
 # global C defines
 #
-glib_major_minor = glib_version.split('.')
-glib_encoded_version = 'GLIB_VERSION_ at 0@_ at 1@'.format(glib_major_minor[0], glib_major_minor[1])
+glib_encoded_version = 'GLIB_VERSION_ at 0@'.format(glib_version.underscorify())
 spice_gtk_global_cflags += ['-DGLIB_VERSION_MIN_REQUIRED=@0@'.format(glib_encoded_version),
                             '-DGLIB_VERSION_MAX_ALLOWED=@0@'.format(glib_encoded_version)]
 
 if spice_gtk_has_gtk
-  gtk_major_minor = gtk_version_required.split('.')
-  gtk_encoded_version='GDK_VERSION_ at 0@_ at 1@'.format(gtk_major_minor[0], gtk_major_minor[1])
+  gtk_encoded_version='GDK_VERSION_ at 0@'.format(gtk_version_required.underscorify())
   spice_gtk_global_cflags += ['-DGDK_VERSION_MIN_REQUIRED=@0@'.format(gtk_encoded_version),
                               '-DGDK_VERSION_MAX_ALLOWED=@0@'.format(gtk_encoded_version)]
 endif
-- 
2.17.1



More information about the Spice-devel mailing list