commit | 5d5390e6c19e5ecdd9564e7cd0fb5dfaf17ef726 | [log] [tgz] |
---|---|---|
author | Thomas Haller <thaller@redhat.com> | Fri Feb 28 11:50:41 2025 +0100 |
committer | Thomas Haller <thaller@redhat.com> | Fri Feb 28 15:01:14 2025 +0100 |
tree | 501caa04e6a4b83737e500e56df266c031768ca0 | |
parent | 49b3271e6bdee8c3f746bb32b07f8e831b0d5d83 [diff] |
gobject: don't allow setting constuct-only property via g_object_set*() The function g_object_set_is_valid_property() has two callers, which in turn have the following callers: - g_object_setv() - g_object_set_property() - g_object_set_valist() - g_object_set() All these functions are public API, but they are never directly called by "gobject.c". This means, during construction of an object, GObject itself does not call any of these functions. Note that you can image cases, where the user obtains a pointer to an object under construction and calls a property setter function again. However, at that point, I don't think they are allowed to reset a construct-only property. Construct-only properties must only be specified during g_object_new() (etc.). Hence, this check for whether we are in construction is unnecessary and wrong. You also cannot use the public property setter functions to set a construct-only property even if the object is still under construction. This changes behavior since aa63f7e3739e ('fix g_object_set() whithin _init() implementations not working for').
GLib is the low-level core library that forms the basis for projects such as GTK and GNOME. It provides data structure handling for C, portability wrappers, and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system.
The official download locations are: https://download.gnome.org/sources/glib
The official web site is: https://www.gtk.org/
See the file ‘INSTALL.md’. There is separate and more in-depth documentation for building GLib on Windows.
Upstream GLib only supports the most recent stable release series, the previous stable release series, and the current development release series. All older versions are not supported upstream and may contain bugs, some of which may be exploitable security vulnerabilities.
See SECURITY.md for more details.
API documentation is available online for GLib for the:
If you have a question about how to use GLib, seek help on GNOME’s Discourse instance. Alternatively, ask a question on StackOverflow and tag it glib
.
Bugs should be reported to the GNOME issue tracking system. You will need to create an account for yourself. You may also submit bugs by e-mail (without an account) by e-mailing incoming+gnome-glib-658-issue-@gitlab.gnome.org, but this will give you a degraded experience.
Bugs are for reporting problems in GLib itself, not for asking questions about how to use it. To ask questions, use one of our discussion forums.
In bug reports please include:
tests/
subdirectory, that will be most convenient. Otherwise, please include a short test program that exhibits the behavior. As a last resort, you can also provide a pointer to a larger piece of software that can be downloaded.Please follow the contribution guide to know how to start contributing to GLib.
Patches should be submitted as merge requests to gitlab.gnome.org. Note that you will need to be logged in to the site to use this page. If the patch fixes an existing issue, please refer to the issue in your commit message with the following notation (for issue 123):
Closes: #123
Otherwise, create a new merge request that introduces the change. Filing a separate issue is not required.