15303 Commits

Author SHA1 Message Date
Dan Winship
fd07c05f85 gcredentialsprivate: clarify the USE_FREEBSD_CMSGCRED users
Add comments clarifying what the three non-FreeBSD platforms using
G_CREDENTIALS_USE_FREEBSD_CMSGCRED are.
2015-02-25 22:00:49 -05:00
Peeter Must
64611c8b95 gcredentials: Add support for DragonFly
https://bugzilla.gnome.org/show_bug.cgi?id=743508
2015-02-25 22:00:38 -05:00
Ilya Konstantinov
87bf24352e gthread: add thread name support on Mac OS
https://bugzilla.gnome.org/show_bug.cgi?id=741807
2015-02-25 22:00:32 -05:00
Philip Withnall
494e865e54 gobject: Fix a typo in a documentation comment 2015-02-25 21:59:55 -05:00
Philip Withnall
1a6d1ced2f gthread: Fix a typo in a documentation comment 2015-02-25 21:59:45 -05:00
Philip Withnall
828a1b082d gstrfuncs: Document that g_ascii_dtostr() writes a nul terminator
And g_ascii_formatd().

Reviewed-by: Ryan Lortie <desrt@desrt.ca>
2015-02-25 21:59:31 -05:00
Philip Withnall
6cc096acbf gtestutils: Add links to gtester and gtester-report documentation
Link some existing text to make cross-referencing a little easier.
2015-02-25 21:59:03 -05:00
Philip Withnall
db4c85e860 gtestutils: Fix a typo in the g_test_add() documentation 2015-02-25 21:58:57 -05:00
Philip Withnall
69c7d383b4 gtestutils: Clarify that test fixtures are allocated by GLib
Make it a little clearer that the user’s fixture setup and teardown
functions don’t have to do the allocation or freeing.
2015-02-25 21:58:50 -05:00
Philip Withnall
4714352cf4 gtestutils: Fix a typo in the g_test_run() documentation 2015-02-25 21:58:28 -05:00
Philip Withnall
75403da009 gsettings: Fix a typo in the GSettings documentation
https://bugzilla.gnome.org/show_bug.cgi?id=741788
2015-02-25 21:58:08 -05:00
TingPing
9b70ddc94c Fix GContentType usage
https://bugzilla.gnome.org/show_bug.cgi?id=734946
2015-02-25 21:57:52 -05:00
Matthias Clasen
c37d690c18 Fix a typo 2015-02-25 21:57:36 -05:00
Thomas Haller
a770c0c3b6 gobject: don't use G_STRLOC in G_OBJECT_WARN_INVALID_PSPEC() macro
Using G_STRLOC ends up embedding unique strings of the form
__FILE__:__LINE__ in the compiled binary. We can avoid these
by passing __FILE__ and __LINE__ separately when constructing
the warning text.
This probably reduces the size of the binary as __FILE__ is
likely already contained as string otherwise.

Note that for GCC 2.x this changes behavior because G_STRLOC
also contained __PRETTY_FUNCTION__.

https://bugzilla.gnome.org/show_bug.cgi?id=741654
2015-02-25 21:57:15 -05:00
Philip Chimento
cdf0795e63 gfile: Explain nonobvious use of my_error
In g_file_make_directory_with_parents(), the my_error variable is used
for several different purposes throughout the whole function, not all of
which are obvious. This explains the situation with some comments.

https://bugzilla.gnome.org/show_bug.cgi?id=719455
2015-02-25 21:57:05 -05:00
Philip Chimento
a28220c00b gfile: Use g_error_matches
Make proper use of g_error_matches() instead of comparing only error codes.

https://bugzilla.gnome.org/show_bug.cgi?id=719455
2015-02-25 21:56:57 -05:00
Philip Chimento
70784ad1b7 gfile: make_directory_with_parents race condition
A race condition could cause g_file_make_directory_with_parents() to
fail with G_IO_ERROR_EXISTS despite the requested directory not
existing.

https://bugzilla.gnome.org/show_bug.cgi?id=719455
2015-02-25 21:56:47 -05:00
Ryan Lortie
18d618b1c9 ghash: minor docs tweak
We should not advise people to cast the result of
g_hash_table_get_keys_as_array() to a type that looks suitable for use
with g_strfreev().  Advise to use (const gchar **) instead.
2015-02-25 21:56:18 -05:00
Dan Winship
90be118de3 gio/tests: add a socket-listener test
Add a GSocketListener test program. Currently the only test is a
regression test for bug 712570 (based on a standalone bug reproducer
provided by Ross Lagerwall).
2015-02-25 21:54:29 -05:00
Ross Lagerwall
0c935d24f4 gio: Prevent hang when finalizing GThreadedSocketService
If all users of a GThreadedSocketService release their references to the
service while a connection thread is running, the thread function will
release the last reference to the service which causes the finalize to
deadlock waiting for all threads to finish (because it's called from the
thread function).

To fix this, don't wait for all threads to finish in the service's
finalize method.  Since the threads hold a reference to the service,
finalize should only be called when all threads are finished running (or
have unrefed the service and are about to finish).

https://bugzilla.gnome.org/show_bug.cgi?id=712570
2015-02-25 21:54:22 -05:00
Sebastian Rasmussen
8d58610b17 Updated Swedish translation 2015-02-15 19:58:12 +00:00
Paolo Borelli
b2c0f52600 Avoid warning when using G_STMT_END macro with MSVC
Workaround found on
http://cnicholson.net/2009/03/stupid-c-tricks-dowhile0-and-c4127/

https://bugzilla.gnome.org/show_bug.cgi?id=742851
2015-01-14 16:25:46 +01:00
Paolo Borelli
9c87acc1c2 Use G_STMT_START/END in gslice.h 2015-01-14 16:25:35 +01:00
Paolo Borelli
824118c207 Use G_STMT_START/END in gtestutils 2015-01-14 16:25:28 +01:00
Chun-wei Fan
7d8e194839 Win32: Update Pre-configured Config Headers
Update glibconfig.h.win32.in so that it will be in-line with the ones that
are produced with configure.ac, for use on Windows builds.

Thanks to Philip Withnall for pointing out the changes needed in bug
727829.
2015-01-07 10:07:25 +08:00
Matthias Clasen
cc23284e69 2.42.1 2.42.1 2014-11-09 18:18:12 -05:00
Krasimir Chonov
27d35c3329 Updated Bulgarian translation 2014-10-11 08:17:43 +03:00
Benjamin Gilbert
68b2b63e12 Fix g_cond_timed_wait() timeout with !CLOCK_MONOTONIC
g_get_monotonic_time() and g_get_real_time() now always use different
clocks, so we cannot avoid correcting for their offset.  Fixes failure
to time out on Mac OS X.

https://bugzilla.gnome.org/show_bug.cgi?id=738197
2014-10-10 06:43:34 -04:00
Aleksander Morgado
bf44b592c8 garray: initialize allocated size in g_byte_array_new_take()
Internal allocation size (array->alloc) was being kept to 0 when a new
GByteArray was created from an already existing heap-allocated buffer.

Among other things, this was making g_byte_array_set_size() fully clear all
the buffer contents (not just the newly allocated memory) when
G_DEBUG=gc-friendly was being used...

  if (G_UNLIKELY (g_mem_gc_friendly))
    memset (array->data + array->alloc, 0, want_alloc - array->alloc);

https://bugzilla.gnome.org/show_bug.cgi?id=738170
2014-10-10 06:43:23 -04:00
Matthias Clasen
af0a8911bc Add advice on g_cancellable_reset
Don't use it at home.
2014-10-10 06:43:13 -04:00
Milo Casagrande
d6dc0de8bf Updated Italian translation 2014-10-05 13:05:56 +00:00
Kjartan Maraas
a75c888050 Updated Norwegian bokmål translation. 2014-10-03 21:51:22 +02:00
Ting-Wei Lan
677fd208a0 GCredentials: Fix ABI break when adding NetBSD support
https://bugzilla.gnome.org/show_bug.cgi?id=728256
2014-09-30 08:44:04 +08:00
Ryan Lortie
b12bd1c3dc properties: disable default deprecation warnings
Disable the deprecation warnings on GObject properties by default.  This
change is only being made on the stable branch, and maybe only for this
one stable series -- the warnings will remain enabled by default on the
unstable releases.
2014-09-25 17:18:22 -04:00
Sweta Kothari
42d0dc363e Updated gujarati translations 2014-09-24 23:09:32 +05:30
Krishnababu Krothapalli
0ab9d66b05 Updated Telugu translation 2014-09-23 14:28:34 +00:00
Hib Eris
e1b84e3296 Include <stdint.h> in glib/valgrind.h
This ensures the uintptr_t type is defined on mingw-w64.

Fixes compile error:

make[4]: Entering directory
`/home/abuild/rpmbuild/BUILD/glib-2.42.0/gobject'
  CC       libgobject_2_0_la-gtype.lo
In file included from gtype.c:24:0:
../glib/valgrind.h: In function 'VALGRIND_PRINTF':
../glib/valgrind.h:5601:4: error: unknown type name 'uintptr_t'
    uintptr_t _qzz_res;
    ^

https://bugzilla.gnome.org/show_bug.cgi?id=737143
2014-09-23 09:08:16 -04:00
Saibal Ray
f5ed7d2d3e Updated Bengali (India) translation 2014-09-23 11:27:44 +00:00
Philip Withnall
f41ebebd34 gtask: Ignore errors from g_thread_pool_push()
g_thread_pool_push() only returns an error if it fails to spawn a new
thread. However, it unconditionally adds the task to its worker queue,
so:
 • if _any_ threads exist in the pool, the task will eventually be
   handled; and
 • if _no_ threads exist in the pool, the task will be handled if one
   is eventually successfully spawned.
If no more threads are ever spawned, the process probably has bigger
problems than a single GTask which is taking forever to complete.

https://bugzilla.gnome.org/show_bug.cgi?id=736806
2014-09-23 08:08:45 +01:00
Philip Withnall
925913d8dd gtask: Document signal handler reference counting
Explain why the signal handler holds a reference to the GTask, even
though that causes a reference loop at first glance.

https://bugzilla.gnome.org/show_bug.cgi?id=736806
2014-09-23 08:08:25 +01:00
Philip Withnall
c6838ffaa1 gtask: Fix a signed/unsigned integer comparison
The GSource times assigned to creation_time are always signed.

https://bugzilla.gnome.org/show_bug.cgi?id=736806
2014-09-23 08:08:25 +01:00
Ryan Lortie
26a240fd10 GLib 2.42.0 2.42.0 2014-09-22 13:15:17 -04:00
A S Alam
c8d884da43 update Punjabi Translation for 3.14 release 2014-09-21 08:52:43 -05:00
Rajesh Ranjan
db41a84239 Updated Hindi translation 2014-09-21 04:14:06 +00:00
YunQiang Su
d3c65dcbba Revert "update zh_CN translation"
Add wrong po file
This reverts commit ee3d55573ff3731b2f92deb5e35decc316d53475.
2014-09-21 10:58:01 +08:00
YunQiang Su
ee3d55573f update zh_CN translation 2014-09-21 10:30:53 +08:00
Tong Hui
f550be0c6a update zh_CN translation 2014-09-21 10:24:22 +08:00
Ask H. Larsen
a2d4a612c6 Updated Danish translation 2014-09-20 17:19:18 +02:00
Ryan Lortie
dceff8fc2c gmain: improve g_source_set_name thread safety
Step up thread safety on g_source_set_name() to the same standard as all
other GSource functions: after we are attached to a main context, this
function should be threadsafe.

https://bugzilla.gnome.org/show_bug.cgi?id=736683
2014-09-19 13:39:00 -04:00
Ryan Lortie
1cbdbef772 gsource: clarify restrictions on non-existant IDs
Document that one must not use the "by id" source APIs with non-existent
IDs.  The real justification behind this restriction is that the reuse
of source ids makes it unsafe to call these functions unless you're
absolutely sure that the source exists and it belongs to you.  If you
call one of these functions on a source that may already have been
removed then you run the risk of finding someone else's source (with
your reused id).

This also bails us out of a slightly tricky situation with respect to
the threadsafety of g_main_context_find_source_by_id().  The fact that
this function doesn't return a reference implies that its return value
cannot be safely accessed unless we already know for sure that a
reference is being held elsewhere (by example, by the main context
itself if we know that the source has not been removed).  The function
itself, however, performs an access to the value, which could result in
a crash.

If we mandate that it is only valid to call this function on
known-to-exist source IDs then we dodge this problem.

https://bugzilla.gnome.org/show_bug.cgi?id=736683
2014-09-19 13:39:00 -04:00