Skip to content
Commits on Source (11)
1.66.1 - 2020-10-03
-------------------
* Update glib annotations
* Windows: Fix running on different drives :mr:`239`
* gimarshallingtests: Add more tests for flags :mr:`235`
* Revert "giscanner: Fix section matching for documentation :mr:`237`" see :issue:`360`
1.66.0 - 2020-09-12
-------------------
......
......@@ -5557,7 +5557,7 @@
 
 
/**
* SECTION:datetime
* SECTION:date-time
* @title: GDateTime
* @short_description: a structure representing Date and Time
* @see_also: #GTimeZone
......@@ -8678,7 +8678,7 @@
 
 
/**
* SECTION:treesbinary
* SECTION:trees-binary
* @title: Balanced Binary Trees
* @short_description: a sorted collection of key/value pairs optimized
* for searching and traversing in order
......@@ -8711,7 +8711,7 @@
 
 
/**
* SECTION:treesnary
* SECTION:trees-nary
* @title: N-ary Trees
* @short_description: trees of data with any number of branches
*
......@@ -20832,7 +20832,7 @@
 
/**
* g_list_free:
* @list: a #GList
* @list: the first link of a #GList
*
* Frees all of the memory used by a #GList.
* The freed elements are returned to the slice allocator.
......@@ -20870,7 +20870,7 @@
 
/**
* g_list_free_full:
* @list: a pointer to a #GList
* @list: the first link of a #GList
* @free_func: the function to be called to free each element's data
*
* Convenience method, which frees all the memory used by a #GList,
......@@ -29424,7 +29424,7 @@
 
/**
* g_slist_free:
* @list: a #GSList
* @list: the first link of a #GSList
*
* Frees all of the memory used by a #GSList.
* The freed elements are returned to the slice allocator.
......@@ -29462,7 +29462,7 @@
 
/**
* g_slist_free_full:
* @list: a pointer to a #GSList
* @list: the first link of a #GSList
* @free_func: the function to be called to free each element's data
*
* Convenience method, which frees all the memory used by a #GSList, and
......@@ -36781,7 +36781,7 @@
* string; it may e.g. include embedded NUL characters. The only
* validation done by this function is to ensure that the input can
* be correctly interpreted as UTF-16, i.e. it doesn't contain
* things unpaired surrogates.
* unpaired surrogates or partial character sequences.
*
* Returns: (transfer full): a pointer to a newly allocated UTF-8 string.
* This value must be freed with g_free(). If an error occurs,
......@@ -1357,12 +1357,7 @@ class GtkDocCommentBlockParser(object):
result = SECTION_RE.match(line)
if result:
# Some projects use kebab-case or CamelCase for section
# names. Convert them all to flat case so we can match
# them easily later on.
identifier_name = 'SECTION:%s' % (result.group('section_name')
.replace("-", "")
.lower(), )
identifier_name = 'SECTION:%s' % (result.group('section_name'), )
identifier_delimiter = None
identifier_fields = None
identifier_fields_start = None
......
......@@ -75,8 +75,14 @@ class Position(object):
self.column or -1)
def format(self, cwd):
filename = os.path.relpath(os.path.realpath(self.filename),
os.path.realpath(cwd))
# Windows: We may be using different drives self.filename and cwd,
# which leads to a ValuError when using os.path.relpath().
# In that case, just use the entire path of self.filename
try:
filename = os.path.relpath(os.path.realpath(self.filename),
os.path.realpath(cwd))
except ValueError:
filename = os.path.realpath(self.filename)
if self.column is not None:
return '%s:%d:%d' % (filename, self.line, self.column)
......
project('gobject-introspection', 'c',
version: '1.66.0',
version: '1.66.1',
meson_version: '>= 0.50.1',
default_options: [
'warning_level=1',
......
......@@ -1522,6 +1522,20 @@ gi_marshalling_tests_array_enum_in (GIMarshallingTestsEnum *v, gint length)
g_assert_cmpint (v[2], ==, GI_MARSHALLING_TESTS_ENUM_VALUE3);
}
/**
* gi_marshalling_tests_array_flags_in:
* @flags: (array length=length) (transfer none):
* @length:
*/
void
gi_marshalling_tests_array_flags_in (GIMarshallingTestsFlags *v, gint length)
{
g_assert_cmpint (length, ==, 3);
g_assert_cmpint (v[0], ==, GI_MARSHALLING_TESTS_FLAGS_VALUE1);
g_assert_cmpint (v[1], ==, GI_MARSHALLING_TESTS_FLAGS_VALUE2);
g_assert_cmpint (v[2], ==, GI_MARSHALLING_TESTS_FLAGS_VALUE3);
}
/**
* gi_marshalling_tests_array_in_guint64_len:
* @ints: (array length=length) (transfer none):
......@@ -3431,9 +3445,23 @@ gi_marshalling_tests_gvalue_in_with_modification (GValue *value)
void
gi_marshalling_tests_gvalue_in_enum (GValue *value)
{
if (!G_VALUE_HOLDS_ENUM (value))
g_critical ("Expected enum, got %s", G_VALUE_TYPE_NAME (value));
g_assert (g_value_get_enum (value) == GI_MARSHALLING_TESTS_ENUM_VALUE3);
}
/**
* gi_marshalling_tests_gvalue_in_flags:
* @value: (transfer none):
*/
void
gi_marshalling_tests_gvalue_in_flags (GValue *value)
{
if (!G_VALUE_HOLDS_FLAGS (value))
g_critical ("Expected flags, got %s", G_VALUE_TYPE_NAME (value));
g_assert_cmpint (g_value_get_flags (value), ==, GI_MARSHALLING_TESTS_FLAGS_VALUE3);
}
/**
* gi_marshalling_tests_gvalue_out:
* @value: (out) (transfer none):
......@@ -4767,6 +4795,33 @@ gi_marshalling_tests_object_vfunc_out_enum (GIMarshallingTestsObject *self, GIMa
g_assert_cmpint (local, ==, 0x12345678);
}
/**
* gi_marshalling_tests_object_vfunc_return_flags:
*/
GIMarshallingTestsFlags
gi_marshalling_tests_object_vfunc_return_flags (GIMarshallingTestsObject *self)
{
/* make sure that local variables don't get smashed */
GIMarshallingTestsFlags return_value;
glong local = 0x12345678;
return_value = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_flags (self);
g_assert_cmpint (local, ==, 0x12345678);
return return_value;
}
/**
* gi_marshalling_tests_object_vfunc_out_flags:
* @flags: (out):
*/
void
gi_marshalling_tests_object_vfunc_out_flags (GIMarshallingTestsObject *self, GIMarshallingTestsFlags *flags)
{
/* make sure that local variables don't get smashed */
gulong local = 0x12345678;
GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_out_flags (self, flags);
g_assert_cmpuint (local, ==, 0x12345678);
}
/* NOTE:
*
......
......@@ -748,6 +748,9 @@ void gi_marshalling_tests_multi_array_key_value_in (gint length, const gchar **k
_GI_TEST_EXTERN
void gi_marshalling_tests_array_enum_in (GIMarshallingTestsEnum *_enum, gint length);
_GI_TEST_EXTERN
void gi_marshalling_tests_array_flags_in (GIMarshallingTestsFlags *flags, gint length);
_GI_TEST_EXTERN
void gi_marshalling_tests_array_in_guint64_len (const gint *ints, guint64 length);
......@@ -1117,6 +1120,9 @@ void gi_marshalling_tests_gvalue_in_with_modification (GValue *value);
_GI_TEST_EXTERN
void gi_marshalling_tests_gvalue_in_enum (GValue *value);
_GI_TEST_EXTERN
void gi_marshalling_tests_gvalue_in_flags (GValue *value);
_GI_TEST_EXTERN
void gi_marshalling_tests_gvalue_out (GValue **value);
......@@ -1515,6 +1521,17 @@ struct _GIMarshallingTestsObjectClass
* @object: (in) (transfer full):
*/
void (* vfunc_in_object_transfer_full) (GIMarshallingTestsObject *self, GObject *object);
/**
* GIMarshallingTestsObjectClass::vfunc_return_flags:
*/
GIMarshallingTestsFlags (* vfunc_return_flags) (GIMarshallingTestsObject *self);
/**
* GIMarshallingTestsObjectClass::vfunc_out_flags:
* @flags: (out):
*/
void (* vfunc_out_flags) (GIMarshallingTestsObject *self, GIMarshallingTestsFlags *flags);
};
struct _GIMarshallingTestsObject
......@@ -1620,6 +1637,12 @@ GIMarshallingTestsEnum gi_marshalling_tests_object_vfunc_return_enum (GIMarshall
_GI_TEST_EXTERN
void gi_marshalling_tests_object_vfunc_out_enum (GIMarshallingTestsObject *self, GIMarshallingTestsEnum *_enum);
_GI_TEST_EXTERN
GIMarshallingTestsFlags gi_marshalling_tests_object_vfunc_return_flags (GIMarshallingTestsObject *self);
_GI_TEST_EXTERN
void gi_marshalling_tests_object_vfunc_out_flags (GIMarshallingTestsObject *self, GIMarshallingTestsFlags *flags);
_GI_TEST_EXTERN
void gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_none (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating);
......
......@@ -329,38 +329,4 @@ returns nothing.</description>
*/</output>
</test>
<test>
<!--
Section name in different case styles
See https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/350
-->
<input>/**
* SECTION:Meep-App
* @short_description: module for gtk-doc unit test
*
* This file contains non-sense code for the sole purpose of testing the docs.
*/</input>
<parser>
<docblock>
<identifier>
<name>SECTION:meepapp</name>
</identifier>
<parameters>
<parameter>
<name>short_description</name>
<description>module for gtk-doc unit test</description>
</parameter>
</parameters>
<description>This file contains non-sense code for the sole purpose of testing the docs.</description>
</docblock>
</parser>
<output>/**
* SECTION:meepapp
* @short_description: module for gtk-doc unit test
*
* This file contains non-sense code for the sole purpose of testing the docs.
*/</output>
</test>
</tests>