[glib/glib-2-60: 2/3] glib-genmarshal: Avoid a string copy for static string valist arguments
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-60: 2/3] glib-genmarshal: Avoid a string copy for static string valist arguments
- Date: Mon, 10 Jun 2019 17:04:02 +0000 (UTC)
commit 804ce8b70363aca50f99587bee75ece2e2b86d77
Author: Philip Withnall <withnall endlessm com>
Date: Sat Jun 8 00:24:37 2019 +0100
glib-genmarshal: Avoid a string copy for static string valist arguments
When building a valist marshaller, we can avoid a string copy if the
argument is known to always be static. The marshaller we ship in
`gmarshal.c` got this right, but marshallers generated by
glib-genmarshal were missing the optimisation. Fix that.
Backported version of !904 does not include the unit test. The version
of this on `master` includes a unit test.
Signed-off-by: Philip Withnall <withnall endlessm com>
Fixes: #1792
gobject/glib-genmarshal.in | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in
index f17e05532..1ea2ad9e8 100755
--- a/gobject/glib-genmarshal.in
+++ b/gobject/glib-genmarshal.in
@@ -330,6 +330,7 @@ IN_ARGS = {
'ctype': 'gpointer',
'getter': 'g_marshal_value_peek_string',
'box': ['g_strdup', 'g_free'],
+ 'static-check': True,
},
'PARAM': {
'signal': 'PARAM',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]