Skip to content
Commits on Source (9)
# Standard C/Automake goo
.deps
.libs
*.typelib
*.la
*.lo
*.o
*.pyc
*.stamp
*~
*.log
*.trs
Makefile
Makefile.in
aclocal.m4
gtk-doc.m4
autom4te.cache
compile
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
gtk-doc.make
INSTALL
install-sh
libtool
ltmain.sh
missing
stamp-h1
ylwrap
py-compile
omf.make
xmldocs.make
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
m4/gtk-doc.m4
GIRepository-2.0.gir
GLib-2.0.gir
GModule-2.0.gir
GObject-2.0.gir
Gio-2.0.gir
cmph-bdz-test
gi-dump-types
g-ir-annotation-tool
g-ir-compiler
g-ir-doc-tool
g-ir-generate
g-ir-inspect
g-ir-scanner
gir/cairo-1.0.gir
glib-print
gobject-introspection-1.0.pc
gobject-introspection-no-export-1.0.pc
gthash-test
scannerlexer.c
scannerlexer.h
scannerparser.c
scannerparser.h
test-driver
tests/Everything-1.0.gir
tests/GIMarshallingTests-1.0.gir
tests/everything-stamp.h
tests/everything.c
tests/everything.h
tests/repository/gitestrepo
tests/repository/giteststructinfo
tests/repository/gitestthrows
tests/repository/gitypelibtest
tests/scanner/Bar-1.0.gir
tests/scanner/GetType-1.0.gir
tests/scanner/GtkFrob-1.0.gir
tests/scanner/Headeronly-1.0.gir
tests/scanner/Regress-1.0.gir
tests/scanner/SLetter-1.0.gir
tests/scanner/Utility-1.0.gir
tests/scanner/WarnLib-1.0.gir
tests/scanner/barapp
tests/scanner/Identfilter-1.0.gir
tests/scanner/Symbolfilter-1.0.gir
tests/scanner/Typedefs-1.0.gir
tests/doctool/DocExamples-1.0.gir
tests/offsets/Offsets-1.0.gir
tests/offsets/gitestoffsets
tests/offsets/offsets.compiled
tests/offsets/offsets.introspected
tests/doctool/DocExamples-1.0-C
tests/doctool/DocExamples-1.0-Python
tests/*/*.log
tests/*/*.trs
.make-check-passed
# tarballs
*.tar.xz
#yelp-build
*.html
C.css
jquery.js
jquery.syntax.js
jquery.syntax.core.js
jquery.syntax.brush.python.js
jquery.syntax.layout.yelp.js
yelp.js
#GTK-Doc output
docs/reference/html
docs/reference/xml
docs/reference/*.bak
docs/reference/gtkdoc-check.log
docs/reference/gtkdoc-check.test
docs/reference/gtkdoc-check.trs
docs/reference/test-suite.log
docs/reference/gi.args
docs/reference/gi.hierarchy
docs/reference/gi.interfaces
docs/reference/gi.prerequisites
docs/reference/gi.signals
docs/reference/gi.types
docs/reference/gi-decl.txt
docs/reference/gi-decl-list.txt
docs/reference/gi-undeclared.txt
docs/reference/gi-undocumented.txt
docs/reference/gi-unused.txt
docs/reference/version.xml
#Shinx documentation output
docs/giscanner/_build/*
giscanner/_version.py
girepository/giversion.h
#g-ir-doc-tool tests
*.page
!tests/scanner/*-expected/*.page
*-sections.txt
!tests/scanner/*-sections-expected.txt
**/.dirstamp
#coverage reports
.coverage
htmlcov*
#Python
__pycache__
#PyDev/Eclipse
.settings
......@@ -156,5 +9,5 @@ htmlcov*
#emacs
.dir-locals.el
.mypy_cache
\ No newline at end of file
# MyPy
.mypy_cache
......@@ -165,4 +165,4 @@ pages:
paths:
- public
only:
- master
- main
......@@ -52,7 +52,7 @@ giscanner
even 'make distcheck'
* While hacking on annotationparser.py it is a good idea to:
1) Update your GLib build to git master.
1) Update your GLib build to the tip of the `main` branch.
2) Run the following command from your gobject-introspection source directory before making
changes to annotationparser.py (adapt GLib source and/or build directory as required):
(cd misc && ./update-glib-annotations.py /path/to/gnome.org/checkout/glib/)
......@@ -61,8 +61,9 @@ giscanner
- gir/gio-2.0.c
- gir/glib-2.0.c
- gir/gobject-2.0.c
When satisfied, commit these files adding "Update GLib annotations to master" as the
commit message.
When satisfied, commit these files adding "Update GLib annotations to ${commit}" as the
commit message. Fill out the `${commit}` with the GLib commit at the tip of the `main`
development branch
4) Only now start editing annotationparser.py.
5) run make check.
6) Run update-glib-annotations.py again and carefully study the changes (if any) to:
......
......@@ -25,14 +25,14 @@ You will need the following, in addition to your Visual Studio installation:
- A recent enough version of GLib, preferably built with the same compiler that
is now being used to build G-I. If none is found, the Meson build will fetch
GLib from GIT master and build it first before continuing to build G-I. Note
that it will require a libintl implementation (must be installed beforehand, the
headers and lib and DLL must be found in the paths specified by %INCLUDE, %LIB%
and %PATH% respectively), along with ZLib and libffi (GLib's own Meson build will
build them if they are not found). If a pre-existing copy of GLib is available,
be sure to set PKG_CONFIG_PATH to where its .pc files can be found, and ensure
that its DLLs/ executables can be first found in the paths specified in %PATH%.
Note that libffi is needed both by GLib and G-I.
GLib from the tip of the main branch and build it first before continuing to
build G-I. Note that it will require a libintl implementation (must be installed
beforehand, the headers and lib and DLL must be found in the paths specified by
%INCLUDE%, %LIB% and %PATH% respectively), along with ZLib and libffi (GLib's
own Meson build will build them if they are not found). If a pre-existing copy
of GLib is available, be sure to set PKG_CONFIG_PATH to where its .pc files can
be found, and ensure that its DLLs/ executables can be first found in the paths
specified in %PATH%. Note that libffi is needed both by GLib and G-I.
- A DLL build of Cairo with Cairo-GObject built, also preferably with the same
compiler that is now used to build G-I.
......
1.72.0 - 2022-03-18
-------------------
* Add new utility API to libgirepository for bindings implementing an argument
cache [Philip Chimento]
* Update the GIR data for GLib, GObject, GModule, and GIO
1.71.0 - 2022-02-14
-------------------
......
......@@ -51,7 +51,21 @@ roundtrip tests (GIR -> typelib -> GIR).
Helping out
-----------
The introspection framework needs a lot more work, see TODO.
The introspection framework needs a lot more work, see the ``TODO`` file.
Default branch renamed to ``main``
----------------------------------
The default development branch of GObject Introspection has been renamed
to ``main``. To update your local checkout, use::
git checkout master
git branch -m master main
git fetch
git branch --unset-upstream
git branch -u origin/main
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
Homepage
--------
......
This diff is collapsed.
This diff is collapsed.
......@@ -250,7 +250,7 @@
* If that fails and @file_name has the ".la"-suffix (and is a libtool
* archive) it tries to open the corresponding module. If that fails
* and it doesn't have the proper module suffix for the platform
* (#G_MODULE_SUFFIX), this suffix will be appended and the corresponding
* (%G_MODULE_SUFFIX), this suffix will be appended and the corresponding
* module will be opened. If that fails and @file_name doesn't have the
* ".la"-suffix, this suffix is appended and g_module_open_full() tries to open
* the corresponding module. If eventually that fails as well, %NULL is
......@@ -277,7 +277,7 @@
* @symbol: (out): returns the pointer to the symbol value
*
* Gets a symbol pointer from a module, such as one exported
* by #G_MODULE_EXPORT. Note that a valid symbol can be %NULL.
* by %G_MODULE_EXPORT. Note that a valid symbol can be %NULL.
*
* Returns: %TRUE on success
*/
......
......@@ -1241,7 +1241,7 @@
* Boxed type handling functions have to be provided to copy and free
* opaque boxed structures of this type.
*
* For the general case, it is recommended to use #G_DEFINE_BOXED_TYPE
* For the general case, it is recommended to use G_DEFINE_BOXED_TYPE()
* instead of calling g_boxed_type_register_static() directly. The macro
* will create the appropriate `*_get_type()` function for the boxed type.
*
......@@ -3333,7 +3333,7 @@
*
* Creates a new instance of a #GObject subtype and sets its properties.
*
* Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
* Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY)
* which are not explicitly specified are set to their default values. Any
* private data for the object is guaranteed to be initialized with zeros, as
* per g_type_create_instance().
......@@ -3372,7 +3372,7 @@
*
* Creates a new instance of a #GObject subtype and sets its properties.
*
* Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
* Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY)
* which are not explicitly specified are set to their default values.
*
* Returns: a new instance of @object_type
......@@ -3407,7 +3407,7 @@
*
* Creates a new instance of a #GObject subtype and sets its properties.
*
* Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
* 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
......@@ -4191,7 +4191,7 @@
/**
* g_param_spec_internal: (skip)
* @param_type: the #GType for the property; must be derived from #G_TYPE_PARAM
* @param_type: the #GType for the property; must be derived from %G_TYPE_PARAM
* @name: the canonical name of the property
* @nick: the nickname of the property
* @blurb: a short description of the property
......@@ -4633,7 +4633,7 @@
* @pspec_info: The #GParamSpecTypeInfo for this #GParamSpec type.
*
* Registers @name as the name of a new static type derived
* from #G_TYPE_PARAM.
* from %G_TYPE_PARAM.
*
* The type system uses the information contained in the #GParamSpecTypeInfo
* structure pointed to by @info to manage the #GParamSpec type and its
......@@ -4779,7 +4779,7 @@
*
* Adds an emission hook for a signal, which will get called for any emission
* of that signal, independent of the instance. This is possible only
* for signals which don't have #G_SIGNAL_NO_HOOKS flag set.
* for signals which don't have %G_SIGNAL_NO_HOOKS flag set.
*
* Returns: the hook id, for later use with g_signal_remove_emission_hook().
*/
......@@ -4805,7 +4805,7 @@
* emitted on.
* @...: parameters to be passed to the parent class closure, followed by a
* location for the return value. If the return type of the signal
* is #G_TYPE_NONE, the return value location can be omitted.
* is %G_TYPE_NONE, the return value location can be omitted.
*
* Calls the original class closure of a signal. This function should
* only be called from an overridden class closure; see
......@@ -4893,7 +4893,7 @@
* @detail: the detail
* @...: parameters to be passed to the signal, followed by a
* location for the return value. If the return type of the signal
* is #G_TYPE_NONE, the return value location can be omitted.
* is %G_TYPE_NONE, the return value location can be omitted.
*
* Emits a signal. Signal emission is done synchronously.
* The method will only return control after all handlers are called or signal emission was stopped.
......@@ -4928,7 +4928,7 @@
* @detail: the detail
* @var_args: a list of parameters to be passed to the signal, followed by a
* location for the return value. If the return type of the signal
* is #G_TYPE_NONE, the return value location can be omitted.
* is %G_TYPE_NONE, the return value location can be omitted.
*
* Emits a signal. Signal emission is done synchronously.
* The method will only return control after all handlers are called or signal emission was stopped.
......@@ -5395,7 +5395,7 @@
* @accu_data: (nullable) (closure accumulator): user data for the @accumulator.
* @c_marshaller: (nullable): the function to translate arrays of parameter
* values to signal emissions into C language callback invocations or %NULL.
* @return_type: the type of return value, or #G_TYPE_NONE for a signal
* @return_type: the type of return value, or %G_TYPE_NONE for a signal
* without a return value.
* @n_params: the number of parameter types to follow.
* @...: a list of types, one for each parameter.
......@@ -5444,7 +5444,7 @@
* @accu_data: (nullable) (closure accumulator): user data for the @accumulator.
* @c_marshaller: (nullable): the function to translate arrays of parameter
* values to signal emissions into C language callback invocations or %NULL.
* @return_type: the type of return value, or #G_TYPE_NONE for a signal
* @return_type: the type of return value, or %G_TYPE_NONE for a signal
* without a return value.
* @n_params: the number of parameter types to follow.
* @...: a list of types, one for each parameter.
......@@ -5484,7 +5484,7 @@
* @accu_data: (nullable) (closure accumulator): user data for the @accumulator.
* @c_marshaller: (nullable): the function to translate arrays of parameter
* values to signal emissions into C language callback invocations or %NULL.
* @return_type: the type of return value, or #G_TYPE_NONE for a signal
* @return_type: the type of return value, or %G_TYPE_NONE for a signal
* without a return value.
* @n_params: the number of parameter types in @args.
* @args: va_list of #GType, one for each parameter.
......@@ -5515,7 +5515,7 @@
* @c_marshaller: (nullable): the function to translate arrays of
* parameter values to signal emissions into C language callback
* invocations or %NULL
* @return_type: the type of return value, or #G_TYPE_NONE for a signal
* @return_type: the type of return value, or %G_TYPE_NONE for a signal
* without a return value
* @n_params: the length of @param_types
* @param_types: (array length=n_params) (nullable): an array of types, one for
......@@ -6607,7 +6607,7 @@
* instances (if not abstract). The value of @flags determines the nature
* (e.g. abstract or not) of the type.
*
* Returns: the new type identifier or #G_TYPE_INVALID if registration failed
* Returns: the new type identifier or %G_TYPE_INVALID if registration failed
*/
......
......@@ -372,8 +372,8 @@ g_type_info_get_storage_type (GITypeInfo *info)
}
/**
* g_type_info_argument_from_hash_pointer:
* @info: a #GITypeInfo
* gi_type_tag_argument_from_hash_pointer:
* @storage_type: a #GITypeTag obtained from g_type_info_get_storage_type()
* @hash_pointer: A pointer, such as a #GHashTable data pointer
* @arg: A #GIArgument to fill in
*
......@@ -387,18 +387,16 @@ g_type_info_get_storage_type (GITypeInfo *info)
* stuffed pointers, regardless of the machine's architecture or endianness.
*
* This function fills in the appropriate field of @arg with the value extracted
* from @hash_pointer, depending on the storage type of @info.
* from @hash_pointer, depending on @storage_type.
*
* Since: 1.66
* Since: 1.72
*/
void
g_type_info_argument_from_hash_pointer (GITypeInfo *info,
gpointer hash_pointer,
gi_type_tag_argument_from_hash_pointer (GITypeTag storage_type,
gpointer hash_pointer,
GIArgument *arg)
{
GITypeTag type_tag = g_type_info_get_storage_type (info);
switch (type_tag)
switch (storage_type)
{
case GI_TYPE_TAG_BOOLEAN:
arg->v_boolean = !!GPOINTER_TO_INT (hash_pointer);
......@@ -440,15 +438,45 @@ g_type_info_argument_from_hash_pointer (GITypeInfo *info,
case GI_TYPE_TAG_FLOAT:
case GI_TYPE_TAG_DOUBLE:
default:
g_critical ("Unsupported type for pointer-stuffing: %s",
g_type_tag_to_string (type_tag));
g_critical ("Unsupported storage type for pointer-stuffing: %s",
g_type_tag_to_string (storage_type));
arg->v_pointer = hash_pointer;
}
}
/**
* g_type_info_hash_pointer_from_argument:
* g_type_info_argument_from_hash_pointer:
* @info: a #GITypeInfo
* @hash_pointer: A pointer, such as a #GHashTable data pointer
* @arg: A #GIArgument to fill in
*
* GLib data structures, such as #GList, #GSList, and #GHashTable, all store
* data pointers.
* In the case where the list or hash table is storing single types rather than
* structs, these data pointers may have values stuffed into them via macros
* such as %GPOINTER_TO_INT.
*
* Use this function to ensure that all values are correctly extracted from
* stuffed pointers, regardless of the machine's architecture or endianness.
*
* This function fills in the appropriate field of @arg with the value extracted
* from @hash_pointer, depending on the storage type of @info.
*
* Since: 1.66
*/
void
g_type_info_argument_from_hash_pointer (GITypeInfo *info,
gpointer hash_pointer,
GIArgument *arg)
{
GITypeTag storage_type = g_type_info_get_storage_type (info);
return gi_type_tag_argument_from_hash_pointer (storage_type, hash_pointer,
arg);
}
/**
* gi_type_tag_hash_pointer_from_argument:
* @storage_type: a #GITypeTag obtained from g_type_info_get_storage_type()
* @arg: A #GIArgument with the value to stuff into a pointer
*
* GLib data structures, such as #GList, #GSList, and #GHashTable, all store
......@@ -461,19 +489,17 @@ g_type_info_argument_from_hash_pointer (GITypeInfo *info,
* pointers, regardless of the machine's architecture or endianness.
*
* This function returns a pointer stuffed with the appropriate field of @arg,
* depending on the storage type of @info.
* depending on @storage_type.
*
* Returns: A stuffed pointer, that can be stored in a #GHashTable, for example
*
* Since: 1.66
* Since: 1.72
*/
gpointer
g_type_info_hash_pointer_from_argument (GITypeInfo *info,
gi_type_tag_hash_pointer_from_argument (GITypeTag storage_type,
GIArgument *arg)
{
GITypeTag type_tag = g_type_info_get_storage_type (info);
switch (type_tag)
switch (storage_type)
{
case GI_TYPE_TAG_BOOLEAN:
return GINT_TO_POINTER (arg->v_boolean);
......@@ -506,8 +532,37 @@ g_type_info_hash_pointer_from_argument (GITypeInfo *info,
case GI_TYPE_TAG_FLOAT:
case GI_TYPE_TAG_DOUBLE:
default:
g_critical ("Unsupported type for pointer-stuffing: %s",
g_type_tag_to_string (type_tag));
g_critical ("Unsupported storage type for pointer-stuffing: %s",
g_type_tag_to_string (storage_type));
return arg->v_pointer;
}
}
/**
* g_type_info_hash_pointer_from_argument:
* @info: a #GITypeInfo
* @arg: A #GIArgument with the value to stuff into a pointer
*
* GLib data structures, such as #GList, #GSList, and #GHashTable, all store
* data pointers.
* In the case where the list or hash table is storing single types rather than
* structs, these data pointers may have values stuffed into them via macros
* such as %GPOINTER_TO_INT.
*
* Use this function to ensure that all values are correctly stuffed into
* pointers, regardless of the machine's architecture or endianness.
*
* This function returns a pointer stuffed with the appropriate field of @arg,
* depending on the storage type of @info.
*
* Returns: A stuffed pointer, that can be stored in a #GHashTable, for example
*
* Since: 1.66
*/
gpointer
g_type_info_hash_pointer_from_argument (GITypeInfo *info,
GIArgument *arg)
{
GITypeTag storage_type = g_type_info_get_storage_type (info);
return gi_type_tag_hash_pointer_from_argument (storage_type, arg);
}
......@@ -146,6 +146,15 @@ GI_AVAILABLE_IN_1_66
gpointer g_type_info_hash_pointer_from_argument (GITypeInfo *info,
GIArgument *arg);
GI_AVAILABLE_IN_1_72
void gi_type_tag_argument_from_hash_pointer (GITypeTag storage_type,
gpointer hash_pointer,
GIArgument *arg);
GI_AVAILABLE_IN_1_72
gpointer gi_type_tag_hash_pointer_from_argument (GITypeTag storage_type,
GIArgument *arg);
G_END_DECLS
......
......@@ -461,7 +461,8 @@ def create_source_scanner(options, args):
# Run the preprocessor, tokenize and construct simple
# objects representing the raw C symbols
ss = SourceScanner()
ss.set_compiler(options.compiler)
if hasattr(options, 'compiler') and options.compiler:
ss.set_compiler(options.compiler)
ss.set_cpp_options(options.cpp_includes,
options.cpp_defines,
options.cpp_undefines,
......
project('gobject-introspection', 'c',
version: '1.71.0',
version: '1.72.0',
meson_version: '>= 0.58.2',
default_options: [
'warning_level=2',
......