Commit Graph

17 Commits

Author SHA1 Message Date
Simon McVittie
8440742c12 migrating-gi: Document command-line option removals
From !3926, !3927.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-14 12:03:36 +00:00
Simon McVittie
64762fdef6 gi-decompile-typelib: Interpret --includedir as most-important-first
This is a behaviour change from g-ir-generate, which treats it as
least-important-first (the last directory on the command-line is
searched first).

gi-compile-repository --includedir and gcc -I are most-important-first
(the first directory on the command-line is searched first) so it seems
like it makes most sense to be consistent with that.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-14 12:00:05 +00:00
Philip Withnall
f51398af91 girepository: Drop GIBoxedInfo
See the previous commit for details.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3245
2024-02-12 13:17:04 +00:00
Philip Withnall
8248382d8b gi-inspect-repository: Change --version argument to --typelib-version
`--version` is conventionally used to find the version of the program
itself. While that’s not currently implemented in
`gi-inspect-repository`, let’s not box ourselves into a corner.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-02-09 20:41:17 +00:00
Philip Withnall
d6d845aee3 docs: Add missing migration guide for gi_repository_get_shared_libraries()
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-02-09 20:40:47 +00:00
Philip Withnall
45468f1bb8 docs: Document girepository-2.0 utility program name changes
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-02-09 20:40:46 +00:00
Philip Withnall
343027d5de girepository: Make GIInfoType private
Eventually, we want to move to using `GType` directly for everything,
since `GIBaseInfo` and its subclasses are all using `GTypeInstance`.

However, that requires quite a lot of changes and we’re about to hit the
API freeze.

So do the smallest set of changes possible to remove `GIInfoType` and
related functions from the public API, which gives us freedom to make
more changes later without breaking API.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
2024-02-08 12:56:02 +00:00
Philip Withnall
86cd95f1ae Merge branch 'gi-info-new' into 'main'
gibaseinfo: Rename gi_info_new() to gi_base_info_new()

See merge request GNOME/glib!3903
2024-02-08 10:34:40 +00:00
Philip Withnall
beb59595b7 gibaseinfo: Rename gi_info_new() to gi_base_info_new()
It’s actually a factory method rather than a constructor, since
`GIBaseInfo` is abstract, but despite that, changing the name so it sits
inside the `GIBaseInfo` class makes sense. There is no `GIInfo` type.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
2024-02-08 10:34:40 +00:00
Philip Withnall
e1cff511e5 Merge branch '3155-union-tests' into 'main'
gitypes: Fix integer values of GIInfoType and add unit tests for GIUnionInfo

See merge request GNOME/glib!3888
2024-02-08 10:25:13 +00:00
Philip Withnall
78698af73f Merge branch '3246-object-info-docs' into 'main'
girepository: Fix declaration of ‘find using interfaces’ methods

Closes #3246

See merge request GNOME/glib!3883
2024-02-08 10:19:16 +00:00
Philip Withnall
62abd578cd Merge branch '3155-typelib-boxed' into 'main'
gitypelib: Switch to refcounting

See merge request GNOME/glib!3900
2024-02-08 10:18:40 +00:00
Philip Withnall
5cc5f413f5 gitypelib: Switch to refcounting
Since `GITypelib` is exposed in the public libgirepository API, it needs
to be a boxed type. So we either need to add a `copy` method to mirror
the existing `free` method, or switch to refcounting. The latter option
seems better, since a `GITypelib` contains internal state about open
`GModule`s and the semantics for copying that would be potentially
complex.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
2024-02-07 21:07:18 +00:00
Philip Withnall
01f9796532 girepository: Add length ‘out’ arguments to several getter methods
This makes them consistent with the other getter methods in
`GIRepository` which return lists/arrays. It’s useful to return the
length, as that means the caller doesn’t have to work it out by
iterating over the entire array.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
2024-02-07 15:47:13 +00:00
Philip Withnall
11e8075e51 giunioninfo: Split success and return value for get_discriminator_offset()
Otherwise there’s no obvious suitable return value to return when the
union is *not* discriminated.

This is an API break, but libgirepository has not been in a stable
release yet, so that’s fine.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
2024-02-06 13:34:17 +00:00
Philip Withnall
7acef299c2 girepository: Fix declaration of ‘find using interfaces’ methods
Fix the declaration and documentation of
`gi_object_info_find_method_using_interfaces()` and
`gi_object_info_find_vfunc_using_interfaces()`. The documentation was
wrong when I wrote it: the value returned is the object or interface
which declares the method or vfunc, not the one which implements it.

The returned declarer info may be a `GIObjectInfo` or a
`GIInterfaceInfo`. Since those two types have no subtype relation
between them, the return type has to be changed to `GIBaseInfo`. Using
`GIObjectInfo` would have been fine in girepository-1.0 because all
`*Info` types were aliases of each other — but since the move to
`GTypeInstance` this is no longer true.

A unit test will be in the following commit.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3246
2024-02-05 18:40:03 +00:00
Philip Withnall
bad849347d docs: Add migration guide for libgirepository
This covers all the API changes from girepository-1.0 to
girepository-2.0 so far.

It was generated by manually looking through the changes in `git diff
af36393e6.. -- girepository/*.h`.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
2024-02-05 18:03:52 +00:00