Skip to content
Commits on Source (77)
......@@ -109,3 +109,12 @@ the following so that we ensure the manifests are embedded to the built DLLs and
for /r %f in (*.dll.manifest) do if exist $(PREFIX)\bin\%~nf mt /manifest %f /outputresource:$(PREFIX)\bin\%~nf;2
for /r %f in (*.exe.manifest) do if exist $(PREFIX)\bin\%~nf mt /manifest %f /outputresource:$(PREFIX)\bin\%~nf;1
Additional notes on using clang-cl (LLVM/CLang's Visual Studio compiler emulation)
----------------------------------------------------------------------------------
Support has been added to build GObject-Introspection with clang-cl, specifically for
running g-ir-scanner with clang-cl and lld-link as the compiler and linker. To enable
such support, you need to set *both* the environment variables CC and CXX to clang-cl
prior to building GObject-Introspection or running g-ir-scanner. This is in line with
building with clang-cl in place of using the stock Visual Studio compiler to perform
builds with the Meson build system.
1.66.0 - 2020-09-12
-------------------
* Support the gtk-doc action syntax :mr:`203`
* Meson fixes with glib and/or g-i is a subproject :mr:`206` :mr:`208`
* GITypeInfo storage type utility API :mr:`205`
* Meson: Fix build as subproject :mr:`214`
* Fixing XDG_DATA_DIRS logic :mr:`215`
* libgirepository: Add a couple missing nullable annotations :mr:`217` :mr:`225`
* dumper: Fix missing symbols in LTO case or with overridden symbol visibility settings :mr:`216`
* Documentation improvements: :mr:`220` :mr:`232`
* Remove old autoconf fallback code for the python tools :mr:`221`
* meson: Rename option `gi_cross_use_{host -> prebuilt}_gi` mr:`211`
* meson: Don't override finding executables when using pre-built tools. :mr:`212`
* meson: gir: add a dependency for g-ir-compiler for building .girs :mr:`228`
* meson: Use pkgconfig generator :mr:`207`
* Fix gi-dump-types.c to build on Windows :mr:`218`
* giscanner: parse block comments for members and fields :mr:`230`
* Add the notion of standalone doc sections :mr:`226`
* giscanner: Add support for using clang-cl :mr:`234`
* giscanner: Fix section matching for documentation :mr:`237`
1.64.1 - 2020-04-05
-------------------
......
......@@ -72,7 +72,7 @@ Show program\(aqs version number and exit
Report bugs at \fI\%https://gitlab.gnome.org/GNOME/gobject\-introspection/issues\fP
.SH HOMEPAGE AND CONTACT
.sp
\fI\%http://live.gnome.org/GObjectIntrospection\fP
\fI\%https://gi.readthedocs.io/\fP
.SH AUTHORS
.sp
Mattias Clasen
......
......@@ -58,7 +58,7 @@ Show program\(aqs version number and exit
Report bugs at \fI\%https://gitlab.gnome.org/GNOME/gobject\-introspection/issues\fP
.SH HOMEPAGE AND CONTACT
.sp
\fI\%http://live.gnome.org/GObjectIntrospection\fP
\fI\%https://gi.readthedocs.io/\fP
.SH AUTHORS
.sp
Mattias Clasen
......
......@@ -177,7 +177,7 @@ generating introspection data in a cross-compilation environment.
Report bugs at \fI\%https://gitlab.gnome.org/GNOME/gobject\-introspection/issues\fP
.SH HOMEPAGE AND CONTACT
.sp
\fI\%http://live.gnome.org/GObjectIntrospection\fP
\fI\%https://gi.readthedocs.io/\fP
.SH AUTHORS
.sp
Johan Dahlin
......
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
......
......@@ -62,7 +62,7 @@ Report bugs at https://gitlab.gnome.org/GNOME/gobject-introspection/issues
HOMEPAGE and CONTACT
====================
http://live.gnome.org/GObjectIntrospection
https://gi.readthedocs.io/
AUTHORS
......
......@@ -48,7 +48,7 @@ Report bugs at https://gitlab.gnome.org/GNOME/gobject-introspection/issues
HOMEPAGE and CONTACT
====================
http://live.gnome.org/GObjectIntrospection
https://gi.readthedocs.io/
AUTHORS
......
......@@ -166,7 +166,7 @@ Report bugs at https://gitlab.gnome.org/GNOME/gobject-introspection/issues
HOMEPAGE and CONTACT
====================
http://live.gnome.org/GObjectIntrospection
https://gi.readthedocs.io/
AUTHORS
......
......@@ -14,7 +14,7 @@ Bindings based on GObject-Introspection
* `JGIR <https://wiki.gnome.org/Projects/JGIR>`__ - Java/JVM bindings (compile time, using typelib)
* `GJS <https://wiki.gnome.org/Projects/Gjs>`__ - Javascript (spidermonkey) bindings (runtime)
* `Seed <https://wiki.gnome.org/Projects/Seed>`__ - Javascript (JSCore, WebKit JS engine) bindings (runtime)
* `sbank <http://live.gnome.org/sbank>`__ - Scheme binding for gobject-introspection (runtime)
* `sbank <https://wiki.gnome.org/sbank>`__ - Scheme binding for gobject-introspection (runtime)
* `GObjectIntrospection/GObjectConsume <https://wiki.gnome.org/Projects/GObjectIntrospection/GObjectConsume>`__ - Qt bindings (compile time)
* `GirFFI <http://github.com/mvz/ruby-gir-ffi>`__ - Ruby bindings (runtime)
* `Ruby-GNOME <https://github.com/ruby-gnome/ruby-gnome>`__ - Ruby bindings (runtime)
......
......@@ -141,6 +141,15 @@ Error domain quarks should always be named in the form
GQuark foo_bar_errors_quark();
Don't have properties and methods with the same name
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Some bindings for dynamic languages expose GObject properties and methods in the
same way, as properties on an object instance. So don't make a GObject property
with the same name as a method, e.g. a property named ``add-feature`` on a class
named ``SoupSession`` which also has a method ``soup_session_add_feature()``.
Custom code in constructors
~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
This diff is collapsed.
This diff is collapsed.
......@@ -419,8 +419,8 @@
*
* ## Parameter names # {#canonical-parameter-names}
*
* A property name consists of segments consisting of ASCII letters and
* digits, separated by either the `-` or `_` character. The first
* A property name consists of one or more segments consisting of ASCII letters
* and digits, separated by either the `-` or `_` character. The first
* character of a property name must be a letter. These are the same rules as
* for signal naming (see g_signal_new()).
*
......@@ -2086,7 +2086,7 @@
* g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
* ]|
*
* Generally, this function is used together with g_closure_ref(). Ane example
* Generally, this function is used together with g_closure_ref(). An example
* of storing a closure for later notification looks like:
* |[<!-- language="C" -->
* static GClosure *notify_closure = NULL;
......@@ -2970,7 +2970,9 @@
* Creates a new instance of a #GObject subtype and sets its properties.
*
* Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
* which are not explicitly specified are set to their default values.
* 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().
*
* Note that in C, small integer types in variable argument lists are promoted
* up to #gint or #guint as appropriate, and read back accordingly. #gint is 32
......@@ -3317,7 +3319,7 @@
* @data: (nullable): An opaque user data pointer
*
* This sets an opaque, named pointer on an object.
* The name is specified through a #GQuark (retrived e.g. via
* The name is specified through a #GQuark (retrieved e.g. via
* g_quark_from_static_string()), and the pointer
* can be gotten back from the @object with g_object_get_qdata()
* until the @object is finalized.
......@@ -3401,7 +3403,7 @@
* {
* // the quark, naming the object data
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
* // retrive the old string list
* // retrieve the old string list
* GList *list = g_object_steal_qdata (object, quark_string_list);
*
* // prepend new string
......@@ -3795,6 +3797,22 @@
*/
/**
* g_param_spec_is_valid_name:
* @name: the canonical name of the property
*
* Validate a property name for a #GParamSpec. This can be useful for
* dynamically-generated properties which need to be validated at run-time
* before actually trying to create them.
*
* See [canonical parameter names][canonical-parameter-names] for details of
* the rules for valid names.
*
* Returns: %TRUE if @name is a valid property name, %FALSE otherwise.
* Since: 2.66
*/
/**
* g_param_spec_long:
* @name: canonical name of the property specified
......@@ -4209,7 +4227,7 @@
/**
* g_param_value_convert:
* @pspec: a valid #GParamSpec
* @src_value: souce #GValue
* @src_value: source #GValue
* @dest_value: destination #GValue of correct type for @pspec
* @strict_validation: %TRUE requires @dest_value to conform to @pspec
* without modifications
......@@ -4532,7 +4550,7 @@
*
* Blocks a handler of an instance so it will not be called during any
* signal emissions unless it is unblocked again. Thus "blocking" a
* signal handler means to temporarily deactive it, a signal handler
* signal handler means to temporarily deactivate it, a signal handler
* has to be unblocked exactly the same amount of times it has been
* blocked before to become active again.
*
......@@ -4718,6 +4736,22 @@
*/
/**
* g_signal_is_valid_name:
* @name: the canonical name of the signal
*
* Validate a signal name. This can be useful for dynamically-generated signals
* which need to be validated at run-time before actually trying to create them.
*
* See [canonical parameter names][canonical-parameter-names] for details of
* the rules for valid names. The rules for signal names are the same as those
* for property names.
*
* Returns: %TRUE if @name is a valid signal name, %FALSE otherwise.
* Since: 2.66
*/
/**
* g_signal_list_ids:
* @itype: Instance or interface type.
......@@ -4839,7 +4873,7 @@
* of a class offset for the signal's class handler. This function
* doesn't need a function pointer exposed in the class structure of
* an object definition, instead the function pointer is passed
* directly and can be overriden by derived classes with
* directly and can be overridden by derived classes with
* g_signal_override_class_closure() or
* g_signal_override_class_handler()and chained to with
* g_signal_chain_from_overridden() or
......@@ -5384,7 +5418,7 @@
* and structure setups for instances: actual instance creation should
* happen through functions supplied by the type's fundamental type
* implementation. So use of g_type_create_instance() is reserved for
* implementators of fundamental types only. E.g. instances of the
* implementers of fundamental types only. E.g. instances of the
* #GObject hierarchy should be created via g_object_new() and never
* directly through g_type_create_instance() which doesn't handle things
* like singleton objects or object construction.
......@@ -5423,7 +5457,7 @@
* and returns the default interface vtable for the type.
*
* If the type is not currently in use, then the default vtable
* for the type will be created and initalized by calling
* for the type will be created and initialized by calling
* the base interface init and default vtable init functions for
* the type (the @base_init and @class_init members of #GTypeInfo).
* Calling g_type_default_interface_ref() is useful when you
......@@ -6694,6 +6728,19 @@
*/
/**
* g_value_set_interned_string:
* @value: a valid #GValue of type %G_TYPE_STRING
* @v_string: (nullable): static string to be set
*
* Set the contents of a %G_TYPE_STRING #GValue to @v_string. The string is
* assumed to be static and interned (canonical, for example from
* g_intern_string()), and is thus not duplicated when setting the #GValue.
*
* Since: 2.66
*/
/**
* g_value_set_long:
* @value: a valid #GValue of type %G_TYPE_LONG
......@@ -6792,6 +6839,9 @@
* Set the contents of a %G_TYPE_STRING #GValue to @v_string.
* The string is assumed to be static, and is thus not duplicated
* when setting the #GValue.
*
* If the the string is a canonical string, using g_value_set_interned_string()
* is more appropriate.
*/
......
......@@ -41,24 +41,14 @@ gir_files = [
typelibdir = join_paths(get_option('libdir'), 'girepository-1.0')
install_data(gir_files, install_dir: girdir)
if get_option('gi_cross_use_host_gi')
scanner_command = [
'g-ir-scanner',
]
else
scanner_command = [
python,
girscanner,
]
endif
scanner_command += [
'--output=@OUTPUT@',
'--no-libtool',
'--quiet',
'--reparse-validate',
'--add-include-path', join_paths(meson.current_build_dir()),
'--add-include-path', join_paths(meson.current_source_dir()),
scanner_command = [
find_program('g-ir-scanner', native: true),
'--output=@OUTPUT@',
'--no-libtool',
'--quiet',
'--reparse-validate',
'--add-include-path', join_paths(meson.current_build_dir()),
'--add-include-path', join_paths(meson.current_source_dir()),
]
dep_type = glib_dep.type_name()
......@@ -458,7 +448,7 @@ foreach gir : gir_files
typelibs += custom_target('generate-typelib-@0@'.format(gir).underscorify(),
input: gir,
output: '@BASENAME@.typelib',
depends: [gobject_gir, ],
depends: [gobject_gir, gircompiler, ],
command: gircompiler_command,
install: true,
install_dir: typelibdir,
......
......@@ -26,6 +26,7 @@ cmph_sources = [
cmph_deps = [
glib_dep,
gobject_dep,
cc.find_library('m', required: false),
]
......@@ -67,6 +68,7 @@ cmph_test = executable('cmph-bdz-test', '../cmph-bdz-test.c',
dependencies: [
cmph_dep,
glib_dep,
gobject_dep,
],
c_args: custom_c_args,
)
......
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#include "gdump.c"
#include <gio/gunixoutputstream.h>
#ifdef G_OS_WIN32
#include <windows.h>
#include <io.h> /* For _get_osfhandle() */
#include <gio/gwin32outputstream.h>
#else
#include <gio/gunixoutputstream.h>
#endif
int
main (int argc,
char **argv)
{
int i;
GOutputStream *stdout;
GOutputStream *Stdout;
GModule *self;
stdout = g_unix_output_stream_new (1, FALSE);
#if defined(G_OS_WIN32)
HANDLE *hnd = (HANDLE) _get_osfhandle (1);
g_return_val_if_fail (hnd && hnd != INVALID_HANDLE_VALUE, 1);
Stdout = g_win32_output_stream_new (hnd, FALSE);
#else
Stdout = g_unix_output_stream_new (1, FALSE);
#endif
self = g_module_open (NULL, 0);
......@@ -26,7 +39,7 @@ main (int argc,
g_clear_error (&error);
}
else
dump_type (type, argv[i], stdout);
dump_type (type, argv[i], Stdout);
}
return 0;
......
......@@ -89,7 +89,7 @@ g_object_info_get_field_offset (GIObjectInfo *info,
*
* Obtain the parent of the object type.
*
* Returns: (transfer full): the #GIObjectInfo. Free the struct by calling
* Returns: (transfer full) (nullable): the #GIObjectInfo. Free the struct by calling
* g_base_info_unref() when done.
*/
GIObjectInfo *
......@@ -419,7 +419,7 @@ g_object_info_get_method (GIObjectInfo *info,
* Obtain a method of the object type given a @name. %NULL will be
* returned if there's no method available with that name.
*
* Returns: (transfer full): the #GIFunctionInfo. Free the struct by calling
* Returns: (transfer full) (nullable): the #GIFunctionInfo. Free the struct by calling
* g_base_info_unref() when done.
*/
GIFunctionInfo *
......@@ -459,7 +459,7 @@ g_object_info_find_method (GIObjectInfo *info,
* Note that this function does *not* search parent classes; you will have
* to chain up if that's desired.
*
* Returns: (transfer full): the #GIFunctionInfo. Free the struct by calling
* Returns: (transfer full) (nullable): the #GIFunctionInfo. Free the struct by calling
* g_base_info_unref() when done.
*/
GIFunctionInfo *
......@@ -569,7 +569,7 @@ g_object_info_get_signal (GIObjectInfo *info,
*
* TODO
*
* Returns: (transfer full): Info for the signal with name @name in @info, or %NULL on failure.
* Returns: (transfer full) (nullable): Info for the signal with name @name in @info, or %NULL on failure.
*/
GISignalInfo *
g_object_info_find_signal (GIObjectInfo *info,
......@@ -668,7 +668,7 @@ g_object_info_get_vfunc (GIObjectInfo *info,
* See the documentation for g_vfunc_info_get_invoker() for more
* information on invoking virtuals.
*
* Returns: (transfer full): the #GIVFuncInfo, or %NULL. Free it with
* Returns: (transfer full) (nullable): the #GIVFuncInfo, or %NULL. Free it with
* g_base_info_unref() when done.
*/
GIVFuncInfo *
......@@ -713,7 +713,7 @@ g_object_info_find_vfunc (GIObjectInfo *info,
* Note that this function does *not* search parent classes; you will have
* to chain up if that's desired.
*
* Returns: (transfer full): the #GIVFuncInfo. Free the struct by calling
* Returns: (transfer full) (nullable): the #GIVFuncInfo. Free the struct by calling
* g_base_info_unref() when done.
*/
GIVFuncInfo *
......@@ -825,7 +825,7 @@ g_object_info_get_constant (GIObjectInfo *info,
* Every #GObject has two structures; an instance structure and a class
* structure. This function returns the metadata for the class structure.
*
* Returns: (transfer full): the #GIStructInfo or %NULL. Free with
* Returns: (transfer full) (nullable): the #GIStructInfo or %NULL. Free with
* g_base_info_unref() when done.
*/
GIStructInfo *
......@@ -889,7 +889,7 @@ _get_func(GIObjectInfo *info,
* the symbol is %GIObjectInfoRefFunction, to fetch the function pointer
* see g_object_info_get_ref_function().
*
* Returns: the symbol or %NULL
* Returns: (nullable): the symbol or %NULL
*/
const char *
g_object_info_get_ref_function (GIObjectInfo *info)
......@@ -917,7 +917,7 @@ g_object_info_get_ref_function (GIObjectInfo *info)
* This takes derivation into account and will reversely traverse
* the base classes of this type, starting at the top type.
*
* Returns: the function pointer or %NULL
* Returns: (nullable): the function pointer or %NULL
*/
GIObjectInfoRefFunction
g_object_info_get_ref_function_pointer (GIObjectInfo *info)
......@@ -937,7 +937,7 @@ g_object_info_get_ref_function_pointer (GIObjectInfo *info)
* the symbol is %GIObjectInfoUnrefFunction, to fetch the function pointer
* see g_object_info_get_unref_function().
*
* Returns: the symbol or %NULL
* Returns: (nullable): the symbol or %NULL
*/
const char *
g_object_info_get_unref_function (GIObjectInfo *info)
......@@ -965,7 +965,7 @@ g_object_info_get_unref_function (GIObjectInfo *info)
* This takes derivation into account and will reversely traverse
* the base classes of this type, starting at the top type.
*
* Returns: the function pointer or %NULL
* Returns: (nullable): the function pointer or %NULL
*/
GIObjectInfoUnrefFunction
g_object_info_get_unref_function_pointer (GIObjectInfo *info)
......@@ -986,7 +986,7 @@ g_object_info_get_unref_function_pointer (GIObjectInfo *info)
* is %GIObjectInfoSetValueFunction, to fetch the function pointer
* see g_object_info_get_set_value_function().
*
* Returns: the symbol or %NULL
* Returns: (nullable): the symbol or %NULL
*/
const char *
g_object_info_get_set_value_function (GIObjectInfo *info)
......@@ -1014,7 +1014,7 @@ g_object_info_get_set_value_function (GIObjectInfo *info)
* This takes derivation into account and will reversely traverse
* the base classes of this type, starting at the top type.
*
* Returns: the function pointer or %NULL
* Returns: (nullable): the function pointer or %NULL
*/
GIObjectInfoSetValueFunction
g_object_info_get_set_value_function_pointer (GIObjectInfo *info)
......@@ -1035,7 +1035,7 @@ g_object_info_get_set_value_function_pointer (GIObjectInfo *info)
* is %GIObjectInfoGetValueFunction, to fetch the function pointer
* see g_object_info_get_get_value_function().
*
* Returns: the symbol or %NULL
* Returns: (nullable): the symbol or %NULL
*/
const char *
g_object_info_get_get_value_function (GIObjectInfo *info)
......@@ -1063,7 +1063,7 @@ g_object_info_get_get_value_function (GIObjectInfo *info)
* This takes derivation into account and will reversely traverse
* the base classes of this type, starting at the top type.
*
* Returns: the function pointer or %NULL
* Returns: (nullable): the function pointer or %NULL
*/
GIObjectInfoGetValueFunction
g_object_info_get_get_value_function_pointer (GIObjectInfo *info)
......
......@@ -1144,7 +1144,7 @@ g_irepository_get_version (GIRepository *repository,
* Note: The namespace must have already been loaded using a function
* such as g_irepository_require() before calling this function.
*
* Returns: Comma-separated list of paths to shared libraries,
* Returns: (nullable): Comma-separated list of paths to shared libraries,
* or %NULL if none are associated
*/
const gchar *
......
......@@ -2830,7 +2830,8 @@ start_element_handler (GMarkupParseContext *context,
ctx, error))
goto out;
if (strcmp ("doc", element_name) == 0 || strcmp ("doc-deprecated", element_name) == 0 ||
strcmp ("doc-stability", element_name) == 0 || strcmp ("doc-version", element_name) == 0)
strcmp ("doc-stability", element_name) == 0 || strcmp ("doc-version", element_name) == 0 ||
strcmp ("docsection", element_name) == 0)
{
state_switch (ctx, STATE_PASSTHROUGH);
goto out;
......