- Aug 07, 2017
-
-
Matthias Clasen authored
-
Simon McVittie authored
Calling g_variant_get (parameters, "(&s)") when parameters has a signature other than (s) is considered to be a programming error. In practice the message bus (dbus-daemon or a reimplementation) should always send the expected type, but be defensive. (Modified by Philip Withnall to improve type check.) Signed-off-by: Simon McVittie <smcv@collabora.com> Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=784392
-
Simon McVittie authored
PulseAudio and LibreOffice are among the services that use this flag. Refusing to queue for a name lets you do this transaction, but atomically, avoiding the transient state where you briefly join the queue and then are given the name when its primary owner drops it: result = RequestName(name) if result == IN_QUEUE: ReleaseName(name) result = EXISTS return result (Modified by Philip Withnall to add documentation.) Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=784392
-
Simon McVittie authored
The implementation passes flags through directly to the RequestName() call, so if any new values break that equivalence, the implementation will have to be changed. Signed-off-by: Simon McVittie <smcv@collabora.com> https://bugzilla.gnome.org/show_bug.cgi?id=784392
-
Philip Withnall authored
If no callback is provided, token is never set, but it’s then passed to g_variant_new_string(), which requires a non-NULL input. Fix that by moving all the option handling inside the (callback != NULL) case. Spotted by Coverity (CID #1378714). Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=785817
-
Mihai Moldovan authored
Since --header --body has been deprecated and replaced with --body --prototypes, the generated body is not wrapped with G_{BEGIN,END}_DECLS any longer. Projects using C++ break due to that. Automatically wrap prototypes individually in G_{BEGIN,END}_DECLS instead. https://bugzilla.gnome.org/show_bug.cgi?id=785554
-
Matej Urbančič authored
-
- Aug 05, 2017
-
-
Daniel Mustieles authored
-
- Aug 04, 2017
-
-
Philip Withnall authored
Signed-off-by: Philip Withnall <withnall@endlessm.com>
-
- Aug 03, 2017
-
-
Tim-Philipp Müller authored
Only needed for glib/tests and entirely optional.
-
Philip Withnall authored
Little did I know when making commit c257757c that a lot of the output of glib-compile-schemas is string matched in some of the unit tests. Fix them to match the updated strings. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=695573
-
Philip Withnall authored
It’s what GLib is standardising on. See bug #772221. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=695573
-
Daniel Boles authored
Mention alternatives that actually still exist instead. https://bugzilla.gnome.org/show_bug.cgi?id=785520
-
Daniel Macks authored
Improves diagnostics and makes test transcripts easier to compare https://bugzilla.gnome.org/show_bug.cgi?id=769135
-
Daniel Macks authored
Some platforms use different extensions for compile-time linkable libraries vs runtime-loadable modules. Need to use special libtool flag in the latter case for consistency with what gmodule expects. https://bugzilla.gnome.org/show_bug.cgi?id=731703
-
Philip Withnall authored
Instead of requiring --enable-compile-warnings or --enable-compile-warnings=yes, allow any value which is not ‘no’. This enables compile warnings for --enable-compile-warnings=maximum or --enable-compile-warnings=error, which are common values for other GNOME projects. While we don’t change our behaviour for [yes, maximum, error], at least it means the warnings are enabled now, rather than disabled. Signed-off-by: Philip Withnall <withnall@endlessm.com>
-
Philip Withnall authored
Accidentally introduced in commit 5cddde1f. Signed-off-by: Philip Withnall <withnall@endlessm.com>
-
Philip Withnall authored
• Fix capitalisation to be consistent • Use Unicode quotation marks where appropriate • Move trailing \n characters out of the translable strings and append them unconditionally Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=695573
-
Daniel Boles authored
-
-
Philip Withnall authored
Mention that it really is a good idea to save errno before doing literally anything else after calling a function which could set it. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=785577
-
Philip Withnall authored
Prevent the situation where errno is set by function A, then function B is called (which is typically _(), but could be anything else) and it overwrites errno, then errno is checked by the caller. errno is a horrific API, and we need to be careful to save its value as soon as a function call (which might set it) returns. i.e. Follow the pattern: int errsv, ret; ret = some_call_which_might_set_errno (); errsv = errno; if (ret < 0) puts (strerror (errsv)); This patch implements that pattern throughout GLib. There might be a few places in the test code which still use errno directly. They should be ported as necessary. It doesn’t modify all the call sites like this: if (some_call_which_might_set_errno () && errno == ESOMETHING) since the refactoring involved is probably more harmful than beneficial there. It does, however, refactor other call sites regardless of whether they were originally buggy. https://bugzilla.gnome.org/show_bug.cgi?id=785577
-
Ondrej Holy authored
get_mtab_read_file and get_mtab_monitor_file returns const path, but const qualifier is missing. Let's add it. https://bugzilla.gnome.org/show_bug.cgi?id=779607
-
Ondrej Holy authored
The /etc/mtab file is still used by some distributions (e.g. Slackware), so it has to be monitored instead of /proc/self/mountinfo in order to avoid races between g_unix_mounts_get and "mounts-changed" signal. The util-linux is built with --enable-libmount-support-mtab in that case and mnt_has_regular_mtab is used for checks. Let's use mnt_has_regular_mtab also to determine which file to monitor. https://bugzilla.gnome.org/show_bug.cgi?id=779607
-
- Aug 01, 2017
-
-
Руслан Ижбулатов authored
WaitForMultipleObjectsEx() returns the index of the *first* handle that triggered the wakeup, and promises that all handles with lower index are still inactive. Therefore, don't check them, only check the handles with higher index. This removes the need of rearranging the handles (and, now, handle_to_fd) array, it's enough to take a pointer to the next item and use it as a new, shorter array. https://bugzilla.gnome.org/show_bug.cgi?id=785468
-
Руслан Ижбулатов authored
Put all ptrs for GPollFDs that contribute handles into an array, the layout of which mirrors the handles array. This way finding GPollFD for a handle is a simple matter of knowing this handle's index in the handles array (which is something we always know). Removes the need to loop through all fds looking for the right one. And, with the message FD also passed along, it's now completely unnecessary to even pass fds to poll_rest() at all. https://bugzilla.gnome.org/show_bug.cgi?id=785468
-
Руслан Ижбулатов authored
Instead of just indicating that messages should be polled for, save the pointer to GPollFD that contains G_WIN32_MSG_HANDLE, and pass it along. This way it won't be necessary to loop through all fds later on, searching for G_WIN32_MSG_HANDLE. https://bugzilla.gnome.org/show_bug.cgi?id=785468
-
Руслан Ижбулатов authored
GCC most likely optimizes that already, but no harm in trying. https://bugzilla.gnome.org/show_bug.cgi?id=785468
-
Руслан Ижбулатов authored
WaitForSingleObjectEx() is supposed to be a more efficient sleep method. It waits on the handle of the current process. That handle will be signaled once the process terminates, and since we're *inside* the process, it'll never happen (and if it does, we won't care anymore). The use of an alertable wait ensures that we wake up when a completion routine wants to run. https://bugzilla.gnome.org/show_bug.cgi?id=785468
-
Alistair Francis authored
The original ready < nhandles - 1 can be re-written as ready + 1 < nhandles which is the same confition that we are checking on the first itteration of the for loop. This means we can remove the if statement and let the for loop check the code. This also has the side effect of removing an invalid check as WAIT_OBJECT_0 was not subtracted from ready in the if statement. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
-
Руслан Ижбулатов authored
It just creates a number of socket pairs, then triggers read-ready status on these pairs in different patterns (none, one, half, all) and checks how much time it takes to g_poll() those. Also sometimes posts a Windows message and polls for its arrival. The g_main_context_new() is necessary to initialize g_poll() debugging on W32. Measures minimal and maximal time it takes to g_poll(), as well as the average, over 1000 runs. Collects the time values into 25 non-linear buckets between 0ns and 1000ns, and displays them at the conclusion of each subtest. https://bugzilla.gnome.org/show_bug.cgi?id=785468
-
-
Emmanuele Bassi authored
This reverts commit 1672678b. A more comprehensive fix will follow.
-
- Jul 26, 2017
-
-
Christoph Reiter authored
In case of Python 2 and stdout being redirected to a file, sys.stdout.encoding is None and it defaults ASCII for encoding text. To match the behaviour of Python 3, which uses the locale encoding also when redirecting to a file, wrap sys.stdout with a StreamWriter using the locale encoding. https://bugzilla.gnome.org/show_bug.cgi?id=785113
-
Debarshi Ray authored
GCC 6.3.1 thinks that tmp is being used uninitialized: gdatetime.c: In function ‘format_ampm’: gdatetime.c:2248:7: warning: ‘tmp’ may be used uninitialized in this function [-Wmaybe-uninitialized] g_free (tmp); ^~~~~~~~~~~~ It is not an actual problem because the code in question is guarded by "if (!locale_is_utf8)" and "#if defined (HAVE_LANGINFO_TIME)", and it does get initialized under those circumstances. Still, it is a small price to pay for a cleaner build and having actual problems stand out more prominently. https://bugzilla.gnome.org/show_bug.cgi?id=785438
-
- Jul 25, 2017
-
-
Piotr Drąg authored
Preset handles xgettext options for us, and we can rely on Meson to parse LINGUAS. https://bugzilla.gnome.org/show_bug.cgi?id=784965
-
- Jul 24, 2017
-
-
Debarshi Ray authored
Unlike g_application_register, there is no public API to unregister the GApplication from D-Bus. Therefore, if the GApplication is set up manually without using g_application_run, then neither can the GApplicationImpl be destroyed nor can dbus_unregister be called before destruction. This is fine as long as no sub-class has implemented dbus_unregister. If they have, their method method will be called after destruction, and they should be prepared to deal with the consequences. As long as there is no public API for unregistering, let's demote the assertion to a WARNING. Bravehearts who don't use g_application_run can continue to implement dbus_unregister, but they would have been adequately notified. This reverts commit c1ae1170. https://bugzilla.gnome.org/show_bug.cgi?id=725950
-
-
- Jul 22, 2017
-
-
Christoph Reiter authored
Instead of using NamedTemporaryFile, which doesn't take an encoding in Python 2 use mkstemp() to create a file and open it with io.open(), with a proper encoding set. https://bugzilla.gnome.org/show_bug.cgi?id=785113
-
- Jul 21, 2017
-
-
Emmanuele Bassi authored
This reverts commit fd329f48. The commit changed the Introspection ABI, and it requires a change in any application using an introspection-based language binding.
-