diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-05-03 09:58:42 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-05-03 10:32:33 +0200 |
commit | b3367fdef37cbbb425c49ee74467146f209ac1d5 (patch) | |
tree | 4db095c9512fcf17ae7cbeb32a1e2e19894a0c87 | |
parent | 794b0a757806fccf567819a34835999f67b068b7 (diff) | |
download | pygobject-b3367fdef37cbbb425c49ee74467146f209ac1d5.tar.gz |
meson: dedup PY_SSIZE_T_CLEAN usage
-rw-r--r-- | gi/meson.build | 4 | ||||
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | tests/meson.build | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/gi/meson.build b/gi/meson.build index 2bef1283..f0731fc0 100644 --- a/gi/meson.build +++ b/gi/meson.build @@ -68,13 +68,13 @@ giext = python.extension_module('_gi', sources, include_directories: include_directories('..'), install: true, subdir : 'gi', - c_args: ['-DPY_SSIZE_T_CLEAN'] + main_c_args + c_args: pyext_c_args + main_c_args ) if pycairo_dep.found() gicairoext = python.extension_module('_gi_cairo', ['pygi-foreign-cairo.c'], dependencies : [python_dep, glib_dep, gi_dep, ffi_dep, pycairo_dep], - c_args: ['-DPY_SSIZE_T_CLEAN'] + main_c_args) + c_args: pyext_c_args + main_c_args) endif subdir('overrides') diff --git a/meson.build b/meson.build index 9f976676..e2cf42b3 100644 --- a/meson.build +++ b/meson.build @@ -104,6 +104,8 @@ endif main_c_args = cc.get_supported_arguments(main_c_args) +pyext_c_args = ['-DPY_SSIZE_T_CLEAN'] + cdata = configuration_data() cdata.set('PYGOBJECT_MAJOR_VERSION', pygobject_version_major) diff --git a/tests/meson.build b/tests/meson.build index bb6ff854..eefc9c5f 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -100,7 +100,7 @@ helper_sources = [ helperext = python.extension_module('testhelper', helper_sources, dependencies : [python_dep, glib_dep, gobject_dep], - c_args: ['-DPY_SSIZE_T_CLEAN'] + main_c_args, + c_args: pyext_c_args + main_c_args, include_directories: include_directories(join_paths('..', 'gi')) ) |