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
This commit is contained in:
Philip Withnall 2019-06-08 00:24:37 +01:00
parent f843ba8c44
commit 804ce8b703

View File

@ -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',