summaryrefslogtreecommitdiff
path: root/girepository
Commit message (Collapse)AuthorAgeFilesLines
* Make test suite work with cross-related optionsJohn Ericson2021-05-231-7/+0
| | | | | | | | | | Because of skepticism I received in #224, I made this PR which keeps the testsuite and CI improvements but doesn't add any new build options. I hope this would be less controversial: - no new knobs - tests for those using existing build options - CI tests `build_introspection_data = false`
* Use g_memdup2() with newer versions of GLibEmmanuele Bassi2021-03-121-1/+9
| | | | | The g_memdup() function has been deprecated, so we should use the new g_memdup2() function if available.
* Merge branch 'objectinfo_nullable' into 'master'Mathieu Duponchelle2020-07-221-14/+14
|\ | | | | | | | | Add missing nullable annotations to GObjectInfo See merge request GNOME/gobject-introspection!225
| * Add missing nullable annotations to GObjectInfoJonne Haß2020-05-261-14/+14
| |
* | Merge branch 'standalone-doc-sections' into 'master'Mathieu Duponchelle2020-07-221-1/+2
|\ \ | | | | | | | | | | | | Add the notion of standalone doc sections. See merge request GNOME/gobject-introspection!226
| * | Add the notion of standalone doc sections.Mathieu Duponchelle2020-07-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Up to now, section annotations had to match a class or interface name in order to be serialized in the gir. With this commit, they now get serialized as docsection nodes, for potential use by documentation tools.
* | | meson: also build gi-dump-types on WindowsChristoph Reiter2020-05-192-2/+3
| | |
* | | Use `_get_oshandle()` and `g_win32_output_stream_new()` instead sinceGisle Vanem2020-05-151-1/+5
| | | | | | | | | | | | | | | | | | `g_win32_output_stream_new_from_fd()` is private in Gio. It's normally not exported unless `GLIB_STATIC_COMPILATION` is effective. PS. Why would i not be called `GIO_STATIC_COMPILATION` for Gio .c-files?
* | | Obs! Change back to `g_unix_output_stream_new()` for non-Win32.Gisle Vanem2020-05-141-1/+1
| | |
* | | [Win32] Fix gi-dump-types.c to build on WindowsGisle Vanem2020-05-141-4/+12
|/ /
* | Add missing nullable annotation to g_object_info_get_parentJonne Haß2020-05-141-1/+1
| |
* | Add missing nullable annotation to g_irepository_get_shared_libraryJonne Haß2020-05-141-1/+1
|/
* girepository: Add GITypeInfo utility functions for storing values in pointersPhilip Chimento2020-04-262-0/+182
| | | | | | | | This functionality is used in both PyGObject and GJS, and if not done correctly can lead to architecture-specific bugs. It seems best to add API in gobject-introspection for the correct way to do it. See also: GNOME/gjs#309
* girepository: Add 1.66 version macroPhilip Chimento2020-04-261-0/+6
| | | | Required for adding new API to the 1.66 series.
* Revert "Revert "Meson: Fix build when glib is built as subproject""Xavier Claessens2020-04-242-1/+4
| | | | This reverts commit 42b7d634a9a7500dcc71651f71844148fc200be3.
* Revert "Meson: Fix build when glib is built as subproject"Emmanuele Bassi2020-04-242-4/+1
| | | | | | This reverts commit ec00edd941953626ac027810f747847f68a71000. The nightly run time does not have Meson 0.54.
* Meson: Fix build when glib is built as subprojectXavier Claessens2020-04-222-1/+4
|
* Fix build reproducibilityJoshua Watt2019-12-111-4/+0
| | | | | | | | | | | | ba744068 ("Make meson.override_find_program working on more complex use cases") made the build no longer reproducible by encoding a build system path into the output. This shouldn't be necessary anyway, since it should be possible to add new paths to search for gir files by setting the XDG_DATA_DIR environment variable. Closes #318 Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
* girepository: Also store GType cache missesCarlos Garnacho2019-11-141-1/+14
| | | | | | | | | | | | | | | | | | | | | There are notably 4 classes of GTypes where a girepository lookup might fail: - GTypes from private interfaces in public objects (eg. MetaCullable in mutter) - GTypes for private base objects with public interfaces (eg. GLocalFile in GLib) - GTypes registered from the language, and presumably not coming from the GIR - GTypes of objects/interfaces that we didn't load a typelib for It is moot to look for those over and over again, and a full lookup can be taxing if looking up for a method/property on objects with those characteristics. It seems we can cache the misses too, so next lookups are just as quick as an introspected GType. The cache is invalidated after loading new typelibs, in case some of the previously missed GTypes is now properly introspected.
* girepository: Fix memory leakPhilip Chimento2019-10-101-0/+2
| | | | In g_irepository_get_object_gtype_interfaces()
* build: use proper dylib versioning on macOSTom Schoonjans2019-09-101-1/+11
|
* Make meson.override_find_program working on more complex use casesThibault Saunier2019-08-151-0/+4
| | | | | | | Add some missing `meson.override_find_program` And make sure that the `.gir` we build are found when used uninstalled as a concequence of `meson.override_find_program`.
* structinfo: Fix offset in find_method()Florian Müllner2019-08-141-4/+1
| | | | | | | | The current offset only considers the fields themselves, but not the optional embedded type that may follow each field. Use the existing helper function instead of computing the offset to fix the issue.
* meson: don't pass "install" to configure_file() unless really neededChristoph Reiter2019-07-261-1/+0
| | | | | | | | | | In our case it was never needed because it defaults to true if install_dir is set, which it always is for all calls. This avoids a warning when running with newer meson where it complains that install is only available with 0.50+. Fixes #298
* scanner: parse and expose function macrosMathieu Duponchelle2019-07-191-1/+6
| | | | | This is useful for documentation tools, and other utilities that rely on full introspection of the C API of a given library.
* girepository: Return pointer array for interface cachePhilip Chimento2019-06-202-4/+4
| | | | | | | | | | | | | In g_irepository_get_object_gtype_interfaces(), returning the address of the first GIBaseInfo* does not work reliably, because the GIBaseInfos are not necessarily stored contiguously. So the second and subsequent ones might be garbage. Instead, return the address of the array of GIBaseInfo pointers. Add a test that verifies the functionality, as well. This is unfortunately an API and ABI break.
* build: Force-include msvc_recommended_pragmas.h on Visual StudioChun-wei Fan2019-04-302-31/+50
| | | | | | | | | | By doing so, we essentially cover the various compiler flags that we want to use for non-Visual Studio builds to check for warnings that might cause real concern. This also skips the checks for the various GCC-isque CFlag checks that are scattered in the various build files on Visual Studio builds, since they are essentially meaningless on Visual Studio builds.
* Fix a possible use-after-free.Elliott Sales de Andrade2019-02-021-1/+1
| | | | | | If g_mapped_file_new fails, then `version` will be freed, but it was already added to the hash table. This means there could be a use-after-free while doing a lookup on the hash table the next time.
* Fix possible leak of transitive dependency name.Elliott Sales de Andrade2019-02-021-1/+2
| | | | | | If a transitive dependency appears twice, the original pointer will be removed from the hash table. Since these names were created by g_strsplit, they need to be freed, or they will leak.
* repository: Fix annotation for g_irepository_get_object_gtype_interfaces()Rico Tzschichholz2019-01-161-2/+2
| | | | Introduced by 9826d952358c8330d72ecba062f489fbdc31bbd1
* repository: g_irepository_get_object_gtype_interfacesColin Walters2019-01-092-0/+105
| | | | | | | | | | | Bindings in some cases need to look up information from a GType dynamically. Support that better by supplying a cache for this information. (Rebased and versioning / gtk-doc stuff added by Philip Chimento.) Closes #38. See gjs#55.
* ci: enable -Werror for msys2+mesonChristoph Reiter2019-01-012-0/+3
|
* Cleanup strict-prototypes warningsTomasz Miąsko2018-12-203-5/+4
|
* meson: add default compiler warning flags and enable -Werror on CIChristoph Reiter2018-12-182-5/+40
| | | | | | | | This enables various compiler warnings project wide and disables the triggered ones for each library/executable. This should give us roughly the same behaviour as with autotools. Tested with gcc8 and clang7.
* meson: Use `copy` instead of an empty configurationEmmanuele Bassi2018-12-181-1/+1
| | | | | The configure_file target has grown a `copy` argument to avoid using an empty configuration_data object since Meson 0.47.
* girepository: Add version macros and functions. Fixes #200Christoph Reiter2018-12-165-1/+179
| | | | | | | | | | | This adds the following macros and functions: GI_MAJOR_VERSION, GI_MICRO_VERSION, GI_MINOR_VERSION, GI_CHECK_VERSION, gi_get_major_version,gi_get_micro_version, gi_get_minor_version. Since we share a prefix with glib we have to namespace these by using the gi_ prefix. g_gi would also work but we already export symbols with gi_ like gi_cclosure_marshal_generic(), gi_type_tag_get_ffi_type() and gi_type_info_extract_ffi_return_value(), so let's not add another naming scheme.
* baseinfo: don't abort when calling g_base_info_get_name() on a GITypeInfo. ↵Christoph Reiter2018-12-151-0/+1
| | | | | | | | | | Fixes #96 GITypeInfo is a GIBaseInfo so calling g_base_info_get_name() on it should do something sensible. g_base_info_get_name() has always been documented to return NULL in case no name is available so return that instead.
* giobjectinfo: Fix some documentation for find_vfunc_using_interfacesJasper St. Pierre2018-12-151-2/+2
| | | | See #66
* docs: Field offsets are in the units of bytesTomasz Miąsko2018-12-141-1/+1
|
* docs: Remove everything not related to libgirepository and restructure. ↵Christoph Reiter2018-12-143-3/+3
| | | | | | | | | | | | | Fixes #244 The gtk-doc docs were including some bits of overal g-i docs but mostly unfinished and outdated. We now have the general docs in sphinx so remove the duplication and make the gtk-docs just about the libgirepository API and nothing more. This also renames some titles and fixes some missing links in the struct hierarchy while at it.
* docs: fix gtk-doc warnings and update version infosChristoph Reiter2018-12-0922-48/+55
| | | | | | | | Move things around and rename things until gtk-doc is happy. This also moves the "Since" annotations to the next stable releases and adds version added info for g_callable_info_get_instance_ownership_transfer() and g_struct_info_find_field().
* writer: Include documentation and symbol position in source filesThibault Saunier2018-11-281-1/+8
| | | | | | | | | | | Some documentation tool (as hotdoc[0]) need to have information about symbol declaration and documentation positions in the source files to be able to do smart indexing (automatically build the documenation index). [0] https://hotdoc.github.io/ Fixes #175
* girnode: remove wrongly added g_assert_not_reached(). Fixes #218Christoph Reiter2018-08-031-1/+1
| | | | | Added in 9535fc48. After the switch it calls _g_ir_node_build_typelib() again handling the other types.
* girepository: port from g_type_class_add_private() to G_ADD_PRIVATE()Christoph Reiter2018-07-301-5/+2
| | | | This lets us enable -Wdeprecated-declarations
* build: enable -Wredundant-declsChristoph Reiter2018-07-291-9/+0
| | | | | The ffi decls were added in cbdd9ee09e367e4dd to work around broken ffi headers. Let's assume this is fixed now.
* build: enable -Wswitch-defaultChristoph Reiter2018-07-297-0/+24
| | | | | | | In case the surrounding code handles missing cases break, otherwise add a g_assert_not_reached(). The generated parser code triggers this as well, so disable it there only.
* build: enable -Wtype-limitsChristoph Reiter2018-07-291-1/+1
| | | | hashv is unsigned, no need to check if >= 0
* build: enable -Wimplicit-fallthroughChristoph Reiter2018-07-291-1/+1
| | | | and fix a missplaced break
* build: enable -WshadowChristoph Reiter2018-07-294-24/+25
|
* build: enable -Wcast-function-typeChristoph Reiter2018-07-292-2/+2
| | | | | | | | Where it's easy add dummy args to match the cast; where the target is a subset just prevent the warning with a cast to void*. Provide a real copy function for the boxed type code in regress_foo. This code is never executed afaics, but why not.