| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Move the preallocation into the GString struct,
and add g_string_init and g_string_clear to
enable on-stack use of GString.
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
GTask: Document issues
See merge request GNOME/glib!3203
|
| |
| |
| |
| |
| |
| |
| |
| | |
We may not be able to fix GTasks broken design,
but at least we should document it and not let
users stumble into this bear trap without warning.
Helps: #1346
|
|\ \
| | |
| | |
| | |
| | | |
gsettings: Support per-desktop overrides in GSettingsAction
See merge request GNOME/glib!3193
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This introduces no functional changes.
Suggested by Christian Persch.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Due to an oversight (I guess), per-desktop default values (which come
from override files such as this one:
https://github.com/endlessm/gnome-shell/blob/master/data/00_org.gnome.shell.gschema.override)
were not checked when getting a GSettings value via a `GSettingsAction`.
Per-desktop default values are correctly returned via all other
GSettings query paths (see calls to
`g_settings_schema_key_get_translated_default()`).
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use 'write' with 'count' <= max value of its return type
Closes #2883
See merge request GNOME/glib!3200
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Limit `count` so that `write` can properly report the number of written bytes.
Limits:
- POSIX: `SSIZE_MAX`
- Windows: `INT_MAX`
Fixes: #2883
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
Some GString optimizations
See merge request GNOME/glib!3199
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We don't need a private inline helper
for this anymore.
|
| | | |
| | | |
| | | |
| | | | |
This lets us use the optimized inline call.
|
| | | |
| | | |
| | | |
| | | | |
Test the inline version too.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This is another very commonly used
GString function.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Test the inline versions too, and test
passing -1 for len.
|
| | | |
| | | |
| | | |
| | | | |
We should check the resulting string too.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add static inline versions of these functions
that boil down to just an memcpy. ag_string_append_len
is used quite a bit in GMarkup and GTK's css parser.
|
| | | |
| | | |
| | | |
| | | | |
This is the case we optimize for.
|
| | |/
| |/|
| | |
| | |
| | | |
Split off g_string_expand, and inline just
the size check.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Fix a couple of `closure` annotations
See merge request GNOME/glib!3198
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
gio/tests/file.c:Fix expectations when running as root
See merge request GNOME/glib!3196
|
| |/ /
| | |
| | |
| | | |
Includes tweaks by Philip Withnall.
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | | |
gregex: Prevent invalid memory access for unmatched subpatterns
Closes #2881
See merge request GNOME/glib!3194
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Based on a test by Emmanuel Pacaud.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #2881
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | | |
Revert "Rename user data parameters to user_data"
Closes #2827
See merge request GNOME/glib!3111
|
| | |
| | |
| | |
| | | |
Calling a callback parameter "user_data" implicitly adds the "closure" attribute in the documentation which is wrong for callbacks.
|
| | |
| | |
| | |
| | | |
This reverts commit 1422e5f81241650c634413911e92d23495692545. The renaming of parameters implicitly introduced "closure" annotations in the documentation which are wrong on callbacks.
|
| | |
| | |
| | |
| | | |
This reverts commit da7a31a052614edd2cc87518585ff371cbb0f204. The renaming of parameters implicitly introduced "closure" annotations in the documentation which are wrong on callbacks.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
garray: Update NULL termination after copying array content
Closes #2877
See merge request GNOME/glib!3190
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
ptr_array_new(len, ., TRUE) ensures that there are at least len+1
elements in pdata, and that pdata[0] is null, but leaves the rest of
pdata uninitialized. After copying the array data into pdata[1] to
pdata[len-1] inclusive, we still need to make sure pdata[len] is a
null terminator.
Note that if len is 0, then pdata is not guaranteed to be non-null. If
it's null, then we can't add null-termination to it until its size
is updated.
Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/2877
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
tests: Improve error message if setting max processes to 1 fails
See merge request GNOME/glib!3191
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This has historically failed on Debian autobuilders, and as a result we
have had a patch for a long time that turned a failure here into a
g_test_skip(). It's not clear whether this still happens, so I'm now
assessing whether the patch can be dropped; but if the prlimit() call
can fail for whatever reason, it would be useful for the error message
to say what limit we were trying to set.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|\ \ \ \
| |_|_|/
|/| | |
| | | |
| | | | |
garray: Avoid calling memcpy with no items
See merge request GNOME/glib!3192
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`memcpy(NULL, ., n)` and `memcpy(., NULL, n)` are undefined behaviour,
even if *n* is zero.
When len is 0 here, callers are allowed to pass in null data, and
GPtrArray also does not guarantee to have allocated rarray->pdata yet.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|\ \ \
| |/ /
|/| |
| | |
| | | |
docs: Fix return type in cmpint
See merge request GNOME/glib!3189
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | | |
glib-compile-schemas: Fix typo in comparison function
See merge request GNOME/glib!3188
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This caused schemas and override files to be sorted incorrectly.
Fixes a regression introduced in commit 861e82efbc.
Spotted by John Wudrick in
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3155#note_1635044.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
|
|\ \
| | |
| | |
| | |
| | | |
build: Don't overwrite build variables
See merge request GNOME/glib!3184
|
| |/
| |
| |
| |
| |
| |
| | |
We cannot use `gvisibility_h` for different visibility header files; you
never know when you're going to refer to the variable again, and
projects might end up needing to retrieve the variable contents—like,
for instance, gobject-introspection using glib as a subproject.
|
|\ \
| |/
|/|
| |
| | |
Include gobject-visibility.h in glib-types.h
See merge request GNOME/glib!3185
|
|/
|
|
|
|
|
|
|
| |
The gobject-introspection build goes through the GLib types when
generating the introspection data for GLib, but it does not include
glib-object.h, otherwise all GObject symbols would end up inside the
GLib namespace. This means we need to import the gobject-visibility.h
header inside glib-types.h. Since the header is guarded by a once
pragma, it doesn't really affect any legitimate user of the C API.
|
|
|
|
| |
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
|
|\
| |
| |
| |
| |
| |
| | |
gutils: Avoid possible leaks in g_find_program_for_path()
Closes #2871
See merge request GNOME/glib!3183
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #2871
|