Imported Upstream version 1.53.1 11/130611/1 upstream/1.53.1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 23 May 2017 06:14:05 +0000 (15:14 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 23 May 2017 06:14:08 +0000 (15:14 +0900)
Change-Id: I0479d2b41c1d83276aaea3b30a6eb0796a227f13
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
14 files changed:
configure.ac
gir/gio-2.0.c
gir/glib-2.0.c
gir/gmodule-2.0.c
gir/gobject-2.0.c
giscanner/utils.py
tests/scanner/Regress-1.0-C-expected/Regress.test_null_strv_in_gvalue.page [new file with mode: 0644]
tests/scanner/Regress-1.0-Gjs-expected/Regress.test_null_strv_in_gvalue.page [new file with mode: 0644]
tests/scanner/Regress-1.0-Python-expected/Regress.test_null_strv_in_gvalue.page [new file with mode: 0644]
tests/scanner/Regress-1.0-expected.gir
tests/scanner/Regress-1.0-sections-expected.txt
tests/scanner/regress.c
tests/scanner/regress.h
win32/vs10/gi-install.propsin

index 0dad4a0..4cbd700 100644 (file)
@@ -3,7 +3,7 @@
 
 dnl the gi version number
 m4_define(gi_major_version, 1)
-m4_define(gi_minor_version, 52)
+m4_define(gi_minor_version, 53)
 m4_define(gi_micro_version, 1)
 m4_define(gi_version, gi_major_version.gi_minor_version.gi_micro_version)
 
@@ -128,7 +128,7 @@ GIR_DIR="$EXPANDED_DATADIR/$GIR_SUFFIX"
 AC_SUBST(GIR_DIR)
 AC_DEFINE_UNQUOTED(GIR_DIR, "$GIR_DIR", [Director prefix for gir installation])
 
-PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.52.1])
+PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.53.1])
 PKG_CHECK_MODULES(GOBJECT, [gobject-2.0])
 PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])
 PKG_CHECK_MODULES(GIO, [gio-2.0])
index 7852855..3da779c 100644 (file)
  *     implementation returns %G_TLS_INTERACTION_HANDLED, then the connection
  *     argument should have been filled in by using
  *     g_tls_connection_set_certificate().
- * @request_certificate_async: ask for a certificate asyncronously.
+ * @request_certificate_async: ask for a certificate asynchronously.
  * @request_certificate_finish: complete operation to ask for a certificate
  *     asynchronously. If the implementation returns %G_TLS_INTERACTION_HANDLED,
  *     then the connection argument of the async method should have been
  *
  *  |[<!-- language="C" -->
  *  // Implement an extension point
- *  G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE);
+ *  G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE)
  *  g_io_extension_point_implement ("my-extension-point",
  *                                  my_example_impl_get_type (),
  *                                  "my-example",
  * initial construction. If the object also implements #GInitable you can
  * optionally call g_initable_init() instead.
  *
+ * This method is intended for language bindings. If writing in C,
+ * g_async_initable_new_async() should typically be used instead.
+ *
  * When the initialization is finished, @callback will be called. You can
  * then call g_async_initable_init_finish() to get the result of the
  * initialization.
  * have undefined behaviour. They will often fail with g_critical() or
  * g_warning(), but this must not be relied on.
  *
- * Implementations of this method must be idempotent: i.e. multiple calls
- * to this function with the same argument should return the same results.
- * Only the first call initializes the object; further calls return the result
- * of the first call. This is so that it's safe to implement the singleton
- * pattern in the GObject constructor function.
+ * Callers should not assume that a class which implements #GAsyncInitable can
+ * be initialized multiple times; for more information, see g_initable_init().
+ * If a class explicitly supports being initialized multiple times,
+ * implementation requires yielding all subsequent calls to init_async() on the
+ * results of the first call.
  *
  * For classes that also support the #GInitable interface, the default
  * implementation of this method will run the g_initable_init() function
  * for any errors.
  *
  * Since: 2.22
+ * Deprecated: 2.54: Use g_object_new_with_properties() and
+ * g_async_initable_init_async() instead. See #GParameter for more information.
  */
 
 
  *
  * Initializes the object implementing the interface.
  *
+ * This method is intended for language bindings. If writing in C,
+ * g_initable_new() should typically be used instead.
+ *
  * The object must be initialized before any real use after initial
  * construction, either with this function or g_async_initable_init_async().
  *
  * g_object_unref() are considered to be invalid, and have undefined
  * behaviour. See the [introduction][ginitable] for more details.
  *
- * Implementations of this method must be idempotent, i.e. multiple calls
- * to this function with the same argument should return the same results.
- * Only the first call initializes the object, further calls return the result
- * of the first call. This is so that it's safe to implement the singleton
- * pattern in the GObject constructor function.
+ * Callers should not assume that a class which implements #GInitable can be
+ * initialized multiple times, unless the class explicitly documents itself as
+ * supporting this. Generally, a class’ implementation of init() can assume
+ * (and assert) that it will only be called once. Previously, this documentation
+ * recommended all #GInitable implementations should be idempotent; that
+ * recommendation was relaxed in GLib 2.54.
+ *
+ * If a class explicitly supports being initialized multiple times, it is
+ * recommended that the method is idempotent: multiple calls with the same
+ * arguments should return the same results. Only the first call initializes
+ * the object; further calls return the result of the first call.
+ *
+ * One reason why a class might need to support idempotent initialization is if
+ * it is designed to be used via the singleton pattern, with a
+ * #GObjectClass.constructor that sometimes returns an existing instance.
+ * In this pattern, a caller would expect to be able to call g_initable_init()
+ * on the result of g_object_new(), regardless of whether it is in fact a new
+ * instance.
  *
  * Returns: %TRUE if successful. If an error has occurred, this function will
  *     return %FALSE and set @error appropriately if present.
  * Returns: (type GObject.Object) (transfer full): a newly allocated
  *      #GObject, or %NULL on error
  * Since: 2.22
+ * Deprecated: 2.54: Use g_object_new_with_properties() and
+ * g_initable_init() instead. See #GParameter for more information.
  */
 
 
  *
  * For behaviour details see g_input_stream_close().
  *
- * The asyncronous methods have a default fallback that uses threads to implement
+ * The asynchronous methods have a default fallback that uses threads to implement
  * asynchronicity, so they are optional for inheriting classes. However, if you
  * override one you must override all.
  */
 /**
  * g_input_stream_read:
  * @stream: a #GInputStream.
- * @buffer: (array length=count) (element-type guint8): a buffer to
- *     read data into (which should be at least count bytes long).
+ * @buffer: (array length=count) (element-type guint8) (out caller-allocates):
+ *     a buffer to read data into (which should be at least count bytes long).
  * @count: the number of bytes that will be read from the stream
  * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
  * @error: location to store the error occurring, or %NULL to ignore
 /**
  * g_input_stream_read_all:
  * @stream: a #GInputStream.
- * @buffer: (array length=count) (element-type guint8): a buffer to
- *     read data into (which should be at least count bytes long).
+ * @buffer: (array length=count) (element-type guint8) (out caller-allocates):
+ *     a buffer to read data into (which should be at least count bytes long).
  * @count: the number of bytes that will be read from the stream
  * @bytes_read: (out): location to store the number of bytes that was read from the stream
  * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
 /**
  * g_input_stream_read_all_async:
  * @stream: A #GInputStream
- * @buffer: (array length=count) (element-type guint8): a buffer to
- *     read data into (which should be at least count bytes long)
+ * @buffer: (array length=count) (element-type guint8) (out caller-allocates):
+ *     a buffer to read data into (which should be at least count bytes long)
  * @count: the number of bytes that will be read from the stream
  * @io_priority: the [I/O priority][io-priority] of the request
  * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore
 /**
  * g_input_stream_read_async:
  * @stream: A #GInputStream.
- * @buffer: (array length=count) (element-type guint8): a buffer to
- *     read data into (which should be at least count bytes long).
+ * @buffer: (array length=count) (element-type guint8) (out caller-allocates):
+ *     a buffer to read data into (which should be at least count bytes long).
  * @count: the number of bytes that will be read from the stream
  * @io_priority: the [I/O priority][io-priority]
  * of the request.
  * be executed before an outstanding request with lower priority. Default
  * priority is %G_PRIORITY_DEFAULT.
  *
- * The asyncronous methods have a default fallback that uses threads to implement
+ * The asynchronous methods have a default fallback that uses threads to implement
  * asynchronicity, so they are optional for inheriting classes. However, if you
  * override one you must override all.
  */
  *
  * On error %NULL is returned and @error is set accordingly.
  *
- * Returns: a new #GBytes, or %NULL on error
+ * Returns: (transfer full): a new #GBytes, or %NULL on error
  * Since: 2.34
  */
 
  *
  * Finishes an asynchronous stream read-into-#GBytes operation.
  *
- * Returns: the newly-allocated #GBytes, or %NULL on error
+ * Returns: (transfer full): the newly-allocated #GBytes, or %NULL on error
  * Since: 2.34
  */
 
 
 
 /**
- * g_unix_mount_at: (skip)
- * @mount_path: path for a possible unix mount.
+ * g_unix_mount_at:
+ * @mount_path: (type filename): path for a possible unix mount.
  * @time_read: (out) (optional): guint64 to contain a timestamp.
  *
  * Gets a #GUnixMountEntry for a given mount path. If @time_read
 
 
 /**
- * g_unix_mount_for: (skip)
- * @file_path: file path on some unix mount.
+ * g_unix_mount_copy:
+ * @mount_entry: a #GUnixMountEntry.
+ *
+ * Makes a copy of @mount_entry.
+ *
+ * Returns: (transfer full): a new #GUnixMountEntry
+ * Since: 2.54
+ */
+
+
+/**
+ * g_unix_mount_for:
+ * @file_path: (type filename): file path on some unix mount.
  * @time_read: (out) (optional): guint64 to contain a timestamp.
  *
  * Gets a #GUnixMountEntry for a given file path. If @time_read
 
 
 /**
+ * g_unix_mount_point_copy:
+ * @mount_point: a #GUnixMountPoint.
+ *
+ * Makes a copy of @mount_point.
+ *
+ * Returns: (transfer full): a new #GUnixMountPoint
+ * Since: 2.54
+ */
+
+
+/**
  * g_unix_mount_point_free:
  * @mount_point: unix mount point to free.
  *
 
 
 /**
- * g_unix_mount_points_get: (skip)
+ * g_unix_mount_points_get:
  * @time_read: (out) (optional): guint64 to contain a timestamp.
  *
  * Gets a #GList of #GUnixMountPoint containing the unix mount points.
 
 
 /**
- * g_unix_mounts_get: (skip)
+ * g_unix_mounts_get:
  * @time_read: (out) (optional): guint64 to contain a timestamp, or %NULL
  *
  * Gets a #GList of #GUnixMountEntry containing the unix mounts.
index bd277b8..43b2920 100644 (file)
  * ]|
  *
  * Note also that, even if no other structured fields are specified, there
- * must always be a "MESSAGE" key before the format string. The "MESSAGE"-format
- * pair has to be the last of the key-value pairs, and "MESSAGE" is the only
+ * must always be a `MESSAGE` key before the format string. The `MESSAGE`-format
+ * pair has to be the last of the key-value pairs, and `MESSAGE` is the only
  * field for which printf()-style formatting is supported.
  *
  * The default writer function for `stdout` and `stderr` will automatically
  * Create a #GSource that will be dispatched upon delivery of the UNIX
  * signal @signum.  In GLib versions before 2.36, only `SIGHUP`, `SIGINT`,
  * `SIGTERM` can be monitored.  In GLib 2.36, `SIGUSR1` and `SIGUSR2`
- * were added.
+ * were added. In GLib 2.54, `SIGWINCH` was added.
  *
  * Note that unlike the UNIX default, all sources which have created a
  * watch will be dispatched, regardless of which underlying thread
index a57ce31..e8012cd 100644 (file)
 
 
 /**
- * GModuleFlags:
- * @G_MODULE_BIND_LAZY: specifies that symbols are only resolved when
- *     needed. The default action is to bind all symbols when the module
- *     is loaded.
- * @G_MODULE_BIND_LOCAL: specifies that symbols in the module should
- *     not be added to the global name space. The default action on most
- *     platforms is to place symbols in the module in the global name space,
- *     which may cause conflicts with existing symbols.
- * @G_MODULE_BIND_MASK: mask for all flags.
- *
- * Flags passed to g_module_open().
- * Note that these flags are not supported on all platforms.
- */
-
-
-/**
  * GModuleUnload:
  * @module: the #GModule about to be unloaded
  *
index d16d28f..6453484 100644 (file)
 
 
 /**
+ * g_enum_to_string:
+ * @g_enum_type: the type identifier of a #GEnumClass type
+ * @value: the value
+ *
+ * Pretty-prints @value in the form of the enum’s name.
+ *
+ * This is intended to be used for debugging purposes. The format of the output
+ * may change in the future.
+ *
+ * Returns: (transfer full): a newly-allocated text string
+ * Since: 2.54
+ */
+
+
+/**
  * g_flags_complete_type_info:
  * @g_flags_type: the type identifier of the type being completed
  * @info: (out callee-allocates): the #GTypeInfo struct to be filled in
 
 
 /**
+ * g_flags_to_string:
+ * @flags_type: the type identifier of a #GFlagsClass type
+ * @value: the value
+ *
+ * Pretty-prints @value in the form of the flag names separated by ` | ` and
+ * sorted. Any extra bits will be shown at the end as a hexadecimal number.
+ *
+ * This is intended to be used for debugging purposes. The format of the output
+ * may change in the future.
+ *
+ * Returns: (transfer full): a newly-allocated text string
+ * Since: 2.54
+ */
+
+
+/**
  * g_object_add_toggle_ref: (skip)
  * @object: a #GObject
  * @notify: a function to call when this reference is the
 
 
 /**
+ * g_object_getv:
+ * @object: a #GObject
+ * @n_properties: the number of properties
+ * @names: (array length=n_properties): the names of each property to get
+ * @values: (array length=n_properties): the values of each property to get
+ *
+ * Gets @n_properties properties for an @object.
+ * Obtained properties will be set to @values. All properties must be valid.
+ * Warnings will be emitted and undefined behaviour may result if invalid
+ * properties are passed in.
+ *
+ * Since: 2.54
+ */
+
+
+/**
  * g_object_interface_find_property:
  * @g_iface: (type GObject.TypeInterface): any interface vtable for the
  *  interface, or the default vtable for the interface
 
 
 /**
- * g_object_newv: (rename-to g_object_new)
+ * g_object_new_with_properties: (rename-to g_object_new)
+ * @object_type: the object type to instantiate
+ * @n_properties: the number of properties
+ * @names: (array length=n_properties): the names of each property to be set
+ * @values: (array length=n_properties): the values of each property to be set
+ *
+ * Creates a new instance of a #GObject subtype and sets its properties using
+ * the provided arrays. Both arrays must have exactly @n_properties elements,
+ * and the names and values correspond by index.
+ *
+ * Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY)
+ * which are not explicitly specified are set to their default values.
+ *
+ * Returns: (type GObject.Object) (transfer full): a new instance of
+ * @object_type
+ * Since: 2.54
+ */
+
+
+/**
+ * g_object_newv:
  * @object_type: the type id of the #GObject subtype to instantiate
  * @n_parameters: the length of the @parameters array
  * @parameters: (array length=n_parameters): an array of #GParameter
  *
  * Returns: (type GObject.Object) (transfer full): a new instance of
  * @object_type
+ * Deprecated: 2.54: Use g_object_new_with_properties() instead.
+ * deprecated. See #GParameter for more information.
  */
 
 
 
 
 /**
+ * g_object_setv: (skip)
+ * @object: a #GObject
+ * @n_properties: the number of properties
+ * @names: (array length=n_properties): the names of each property to be set
+ * @values: (array length=n_properties): the values of each property to be set
+ *
+ * Sets @n_properties properties for an @object.
+ * Properties to be set will be taken from @values. All properties must be
+ * valid. Warnings will be emitted and undefined behaviour may result if invalid
+ * properties are passed in.
+ *
+ * Since: 2.54
+ */
+
+
+/**
  * g_object_steal_data:
  * @object: #GObject containing the associations
  * @key: name of the key
index aff5393..da848d5 100644 (file)
@@ -159,7 +159,7 @@ def get_libtool_command(options):
         libtool_cmd = 'glibtool'
     try:
         subprocess.check_call([libtool_cmd, '--version'],
-                              stdout=open(os.devnull))
+                              stdout=open('/dev/null', 'w'))
     except (subprocess.CalledProcessError, OSError):
         # If libtool's not installed, assume we don't need it
         return None
diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.test_null_strv_in_gvalue.page b/tests/scanner/Regress-1.0-C-expected/Regress.test_null_strv_in_gvalue.page
new file mode 100644 (file)
index 0000000..525b936
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<page id="Regress.test_null_strv_in_gvalue"
+      type="topic"
+      style="function"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/1.0/ui/">
+  <info>
+    <link xref="index" group="function" type="guide"/>
+    <api:function>
+      <api:returns>
+        <api:type>GValue*</api:type>
+      </api:returns>
+      <api:name>regress_test_null_strv_in_gvalue</api:name>
+    </api:function>
+  </info>
+  <title>regress_test_null_strv_in_gvalue</title>
+  <synopsis><code mime="text/x-csrc">
+GValue* regress_test_null_strv_in_gvalue (void);
+  </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>Returns</code></title>
+
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.test_null_strv_in_gvalue.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.test_null_strv_in_gvalue.page
new file mode 100644 (file)
index 0000000..d1a10a3
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<page id="Regress.test_null_strv_in_gvalue"
+      type="topic"
+      style="function"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/1.0/ui/">
+  <info>
+    <link xref="index" group="function" type="guide"/>
+    <api:function>
+      <api:returns>
+        <api:type>Any</api:type>
+      </api:returns>
+      <api:name>regress_test_null_strv_in_gvalue</api:name>
+    </api:function>
+  </info>
+  <title>Regress.test_null_strv_in_gvalue</title>
+  <synopsis><code mime="text/x-gjs">
+function test_null_strv_in_gvalue(): Any {
+    // Gjs wrapper for regress_test_null_strv_in_gvalue()
+}
+  </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>Returns</code></title>
+
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.test_null_strv_in_gvalue.page b/tests/scanner/Regress-1.0-Python-expected/Regress.test_null_strv_in_gvalue.page
new file mode 100644 (file)
index 0000000..e0828b4
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<page id="Regress.test_null_strv_in_gvalue"
+      type="topic"
+      style="function"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/1.0/ui/">
+  <info>
+    <link xref="index" group="function" type="guide"/>
+    <api:function>
+      <api:returns>
+        <api:type>GObject.Value</api:type>
+      </api:returns>
+      <api:name>regress_test_null_strv_in_gvalue</api:name>
+    </api:function>
+  </info>
+  <title>Regress.test_null_strv_in_gvalue</title>
+  <synopsis><code mime="text/x-python">
+@returns(GObject.Value)
+def test_null_strv_in_gvalue():
+    # Python wrapper for regress_test_null_strv_in_gvalue()
+  </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>Returns</code></title>
+{formatter.format(node, node.retval.doc)}
+</item>
+</terms>
+
+</page>
index a9f5972..91efacc 100644 (file)
@@ -6358,6 +6358,12 @@ What we're testing here is that the scanner ignores the @a nested inside XML.</d
         </parameter>
       </parameters>
     </function>
+    <function name="test_null_strv_in_gvalue"
+              c:identifier="regress_test_null_strv_in_gvalue">
+      <return-value transfer-ownership="full">
+        <type name="GObject.Value" c:type="GValue*"/>
+      </return-value>
+    </function>
     <function name="test_owned_gerror_callback"
               c:identifier="regress_test_owned_gerror_callback">
       <return-value transfer-ownership="none">
index 8aa818e..a9574f9 100644 (file)
@@ -159,6 +159,7 @@ regress_test_multiline_doc_comments
 regress_test_nested_parameter
 regress_test_noptr_callback
 regress_test_null_gerror_callback
+regress_test_null_strv_in_gvalue
 regress_test_owned_gerror_callback
 regress_test_return_allow_none
 regress_test_return_nullable
index 638587e..153b6d4 100644 (file)
@@ -4122,6 +4122,23 @@ regress_test_strv_in_gvalue (void)
 }
 
 /**
+ * regress_test_null_strv_in_gvalue:
+ *
+ * Returns: (transfer full):
+ */
+GValue *
+regress_test_null_strv_in_gvalue (void)
+{
+  GValue *value = g_new0 (GValue, 1);
+  const char **strv = NULL;
+
+  g_value_init (value, G_TYPE_STRV);
+  g_value_set_boxed (value, strv);
+
+  return value;
+}
+
+/**
  * regress_test_multiline_doc_comments:
  *
  * This is a function.
index 4771cc6..f7205f3 100644 (file)
@@ -1278,6 +1278,9 @@ GValue *regress_test_date_in_gvalue (void);
 _GI_TEST_EXTERN
 GValue *regress_test_strv_in_gvalue (void);
 
+_GI_TEST_EXTERN
+GValue *regress_test_null_strv_in_gvalue (void);
+
 
 _GI_TEST_EXTERN
 GObject * _regress_this_is_a_private_symbol (void);
index 86e8c19..2304a44 100644 (file)
@@ -56,7 +56,7 @@ copy ..\..\girepository\gdump.c $(CopyDir)\share\gobject-introspection-$(ApiVers
 
 mkdir $(CopyDir)\lib
 
-copy $(BinDir)\bin\girepository-$(ApiVersion).lib $(CopyDir)\lib
+copy $(BinDir)\girepository-$(ApiVersion).lib $(CopyDir)\lib
 
 mkdir $(CopyDir)\share\gir-$(ApiVersion)
 copy ..\cairo-1.0.gir $(CopyDir)\share\gir-$(ApiVersion)