introspection: Add more filename type annotations for strings which can contain filenames

This continues the changes done in https://bugzilla.gnome.org/show_bug.cgi?id=767245

This makes it possible to pass Python path types as process arguments and env vars
in PyGObject and and makes it clear that the values are not strictly utf-8 and need
to be validated/converted first.

https://bugzilla.gnome.org/show_bug.cgi?id=788863
This commit is contained in:
Christoph Reiter
2017-10-11 18:49:11 +02:00
parent 3d35379382
commit fed574a0c8
10 changed files with 86 additions and 66 deletions

View File

@@ -987,8 +987,8 @@ g_app_launch_context_init (GAppLaunchContext *context)
/**
* g_app_launch_context_setenv:
* @context: a #GAppLaunchContext
* @variable: the environment variable to set
* @value: the value for to set the variable to.
* @variable: (type filename): the environment variable to set
* @value: (type filename): the value for to set the variable to.
*
* Arranges for @variable to be set to @value in the child's
* environment when @context is used to launch an application.
@@ -1010,7 +1010,7 @@ g_app_launch_context_setenv (GAppLaunchContext *context,
/**
* g_app_launch_context_unsetenv:
* @context: a #GAppLaunchContext
* @variable: the environment variable to remove
* @variable: (type filename): the environment variable to remove
*
* Arranges for @variable to be unset in the child's environment
* when @context is used to launch an application.
@@ -1037,8 +1037,8 @@ g_app_launch_context_unsetenv (GAppLaunchContext *context,
* This is a %NULL-terminated array of strings, where each string has
* the form `KEY=VALUE`.
*
* Returns: (array zero-terminated=1) (transfer full): the
* child's environment
* Returns: (array zero-terminated=1) (element-type filename) (transfer full):
* the child's environment
*
* Since: 2.32
*/