Commit Graph

15120 Commits

Author SHA1 Message Date
Christian Persch
b39b19ca20 unicode: Update test data files for unicode 7.0.0
https://bugzilla.gnome.org/show_bug.cgi?id=731929#c2
2014-06-29 20:18:48 +02:00
Sébastien Wilmet
ffe286e647 doc: improve doc of g_file_equal()
A critical message is printed when a parameter of g_file_equal() is not
a GFile. When we read the documentation before this commit, we can think
that passing NULL or another type than GFile is allowed, but it is not
the case.

Another option is to allow NULL parameters. But for consistency with
e.g. g_str_equal(), it's probably better to keep the code as is.

https://bugzilla.gnome.org/show_bug.cgi?id=732357
2014-06-29 17:57:24 +02:00
Sébastien Wilmet
82352ab8e7 doc: various improvements
- g_subprocess_launcher_spawn() and spawnv(): there is no other way
  AFAIK to create a GSubprocess from a launcher. So these
  functions are not "convenience helper".

- annotate optional arguments for g_shell_parse_argv().

- other trivial fix

https://bugzilla.gnome.org/show_bug.cgi?id=732357
2014-06-29 17:57:24 +02:00
Ryan Lortie
42e04f4eff GActionEntry: one more docs fix
Hyperlink "GVariant text format".
2014-06-29 11:34:16 -04:00
Ryan Lortie
c78037773b GActionEntry: improve documentation
Document that giving %NULL for the activate handler is supported since
GLib 2.40.  We documented this on GSimpleAction itself (where the
default handler functionality is implemented) but expecting the user to
dig that up is asking a bit much.

Also, add some more explicit documentation about the conditions under
which each field is expected to be filled in.

https://bugzilla.gnome.org/show_bug.cgi?id=732429
2014-06-29 11:14:45 -04:00
Koop Mast
1b3deb5f56 Change gio/data-to-c.pl to /usr/bin/env perl.
On FreeBSD perl gets installed in /usr/local, And a compat symlink in
/usr/bin. However this symlink might go away in the future.

https://bugzilla.gnome.org/show_bug.cgi?id=724986
2014-06-28 14:06:59 -04:00
Patrick Welche
afce39c228 gcredentials: add NetBSD support
https://bugzilla.gnome.org/show_bug.cgi?id=728256
2014-06-28 14:06:36 -04:00
Lars Uebernickel
01098e34c1 GNotification: add priority
https://bugzilla.gnome.org/show_bug.cgi?id=731623
2014-06-28 14:05:23 -04:00
Kang Hu
baef9d1811 gobject: move _g_type_debug_flags from gtype.h to gtype-private.h
_g_type_debug_flags is used internally to suport GOBJECT_DEBUG
environment variable. it should never be exposed to the outside.

https://bugzilla.gnome.org/show_bug.cgi?id=729914
2014-06-28 14:00:32 -04:00
Mikhail Zabaluev
9f5afe3966 glib/tests/mainloop: Acquire the context while asserting its state
The iteration methods presume that the context is acquired.

https://bugzilla.gnome.org/show_bug.cgi?id=699132
2014-06-28 13:56:07 -04:00
Mikhail Zabaluev
c0e8f8a8db A simple test for polling on a file-like descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=699132
2014-06-28 13:56:07 -04:00
Ryan Lortie
0007376128 giochannel: avoid setting uninitialised length
Our internal call to g_io_channel_read_line_backend() may return
G_IO_STATUS_ERROR, in which case two things will be true:

 - the GError will have been set (if appropriate)

 - the &got_length return value may not have been set

Since it's our convention to leave 'out' parameters untouched in
exception cases, this is perfectly fine.  Unfortunately,
g_io_channel_read_line(), in wrapping this internal function, always
promotes the length parameter, even in the case of error.

Stop doing that in order to avoid overwriting the callers's variable
with junk in the error case.

https://bugzilla.gnome.org/show_bug.cgi?id=731339
2014-06-28 13:51:23 -04:00
Bastien Nocera
88b284c070 GDateTime: Add guards to g_date_time_new()
https://bugzilla.gnome.org/show_bug.cgi?id=728401
2014-06-28 13:46:17 -04:00
Florian Pelz
f18811f2dc docs: Fix formatting of g_alloca documentation.
https://bugzilla.gnome.org/show_bug.cgi?id=729825
2014-06-28 13:43:23 -04:00
Daniel Macks
cc38cb359f Convert multiple #if/#endif to single #if/#elif/#endif
https://bugzilla.gnome.org/show_bug.cgi?id=731424
2014-06-28 13:19:56 -04:00
Patrick Welche
ab9f63fadd gmessages: make g_assert_warning compiler friendly
https://bugzilla.gnome.org/show_bug.cgi?id=720708
2014-06-28 13:17:16 -04:00
Ryan Lortie
dce88768dc all: remove use of 'register' keyword
We should have done this a decade ago...

https://bugzilla.gnome.org/show_bug.cgi?id=730293
2014-06-28 13:07:52 -04:00
Christian Persch
d217429729 unicode: Update to unicode 7.0.0
See bug https://bugzilla.gnome.org/show_bug.cgi?id=731929.
2014-06-28 12:49:38 -04:00
Christian Persch
30ed5f53e2 unicode: Switch compose_second_single to gunichar
This will be required for the update to unicode 7.0.0.
2014-06-28 12:49:07 -04:00
Christian Persch
7e3d32b705 unicode: Move gscripttable.h generation into main script
So we just have to run one script when updating the unicode data, not two.
2014-06-28 12:49:07 -04:00
Christian Persch
33c8a89490 unicode: Simplify width table generation
Move width table generation into the gen-unicode-tables.pl script. This makes
updating the tables automatic without the previously required manual editing
required to insert the tables in the right place of the source code.
2014-06-28 12:49:07 -04:00
Ryan Lortie
6677906436 GObject: tweak property deprecation warnings
Don't emit property deprecation warnings for construct properties that
are being set to their default value during construction, but _do_ emit
them in all cases when the property was explicitly given to
g_object_new().

https://bugzilla.gnome.org/show_bug.cgi?id=732184
2014-06-27 14:44:36 -04:00
Ryan Lortie
4d327bdcb0 GTimeZone: remove some dead code
Remove code that parsed out and stored the unused isstd and isgmt
fields.
2014-06-27 13:21:15 -04:00
Emmanuele Bassi
f948a71483 gtype: Remove unused header
GType does not use GBSearchArray any more.
2014-06-25 11:56:12 +01:00
Ryan Lortie
59c9291f5f Revert "gsettings: remove long-deprecated "schema" property"
This reverts commit cf9b162e0d.

It turns out that there are still a very large number of users of this
API.

https://bugzilla.gnome.org/show_bug.cgi?id=732102
2014-06-24 16:57:12 -04:00
Ryan Lortie
d0e7061785 GObject: warn on use of deprecated properties
By default G_PARAM_DEPRECATED means absolutely nothing.  We only emit a
warning if G_ENABLE_DIAGNOSTIC is set to '1' and then, only on sets.

Turn the logic on its head: emit the warning by default, unless
G_ENABLE_DIAGNOSTIC is set to 0.  In order to avoid a torrent of output, only
emit a warning once per property name.

https://bugzilla.gnome.org/show_bug.cgi?id=732184
2014-06-24 16:18:30 -04:00
Edward Hervey
c5c3c320a2 gvalue: New g_value_init_from_instance
Used for the commonly used case (in signal emission) where we
initialize and set a GValue for an instance

Includes a fast-path for GObject

Overall makes it 6 times faster than the previous combination
of g_value_init + g_value_set_instance

Makes signal emission around 10% faster

https://bugzilla.gnome.org/show_bug.cgi?id=731950
2014-06-24 14:21:10 -04:00
Ryan Lortie
f727c820b8 gvariant tests: workaround libc/compiler "issue"
memcmp() is declared by glibc as follows:

  /* Compare N bytes of S1 and S2.  */
  extern int memcmp (const void *__s1, const void *__s2, size_t __n)
       __THROW __attribute_pure__ __nonnull ((1, 2));

despite the fact that it is valid to call it with a null pointer if the
size is zero.

gcc 4.9.0 contains a new optimisation that sees that we pass a pointer
to this function and concludes that it certainly must not be null,
removing a later check and thereby causing a crash.

We protect the invocation of memcmp() with a condition to prevent gcc
from making this false assumption (arguably under wrong advice from
glibc).
2014-06-24 14:18:29 -04:00
Ryan Lortie
cf9b162e0d gsettings: remove long-deprecated "schema" property
This property has been deprecated for three years after only having
existed for one.  We've wanted to reuse the name for all that time, so
let's try to actually remove it now and see if we can get away with it.

https://bugzilla.gnome.org/show_bug.cgi?id=732102
2014-06-24 14:18:28 -04:00
Ryan Lortie
f2ceb74e91 gsettings test: stop testing long-deprecated API
We want to try taking this away now...

https://bugzilla.gnome.org/show_bug.cgi?id=732102
2014-06-24 14:18:28 -04:00
Michael Catanzaro
753e6ef7d7 docs: fix typos 2014-06-24 10:49:21 -05:00
Matthias Clasen
bc56512dd7 Bump version 2014-06-23 23:14:56 -04:00
Matthias Clasen
1429ff12d8 2.41.1 2014-06-23 21:58:07 -04:00
Philip Withnall
f1095de46f gsocketlistener: Don’t explicitly close sockets on finalisation
Instead of closing the sockets explicitly, let them close themselves
when their final reference is dropped. This makes use of
g_socket_listener_add_socket() more natural.

https://bugzilla.gnome.org/show_bug.cgi?id=732107
2014-06-23 16:53:38 +01:00
Philip Withnall
00e733315d gsocket: Document that g_socket_create_source() holds a socket ref
This is quite important, as it means you can safely let the GSocket drop
out of scope while maintaining a reference to the GSource, and the
socket will remain open. That means fewer closure structures, simpler
code, and fewer allocations.

https://bugzilla.gnome.org/show_bug.cgi?id=732081
2014-06-23 16:24:47 +01:00
Philip Withnall
248ca72782 gsignal: Add an example to the g_signal_connect_swapped() documentation
The precise behaviour of and motivation behind swapping parameters was
not entirely clear before.

https://bugzilla.gnome.org/show_bug.cgi?id=732068
2014-06-23 12:30:51 +01:00
Matthias Clasen
90025254fd Return folder as icon for directories
'folder' is the name of the folder icon in the incon naming spec,
and the Adwaita icon theme doesn't include an inode-directory icon.
This fixes folders appearing as generic file in the file chooser.

https://bugzilla.gnome.org/show_bug.cgi?id=731996
2014-06-22 14:34:27 -04:00
Philip Withnall
d80adeaa96 gtestdbus: Don’t close stdout for dbus-daemon
The stdout FD passed to dbus-daemon is propagated to all its child
processes, such as service activated processes. If we close the FD after
reading the bus address from the daemon, any child process which
subsequently writes to stdout (e.g. for logging) will get a SIGPIPE and
explode.

Instead of closing the stdout FD immediately after dbus-daemon has
spawned, keep it open until the daemon is killed.

https://bugzilla.gnome.org/show_bug.cgi?id=732019
2014-06-22 13:02:18 +01:00
Philip Withnall
0950369899 gclosure: Remove an unused alloca() and assignment
Coverity issue: #1159511

https://bugzilla.gnome.org/show_bug.cgi?id=732005
2014-06-22 12:57:57 +01:00
Philip Withnall
afea86a7ef goption: Remove an unused assignment
Coverity issue: #1159514

https://bugzilla.gnome.org/show_bug.cgi?id=732005
2014-06-22 12:57:57 +01:00
Philip Withnall
6b8ae8f21b gwakeup: Clarify buffer sizing in g_wakeup_signal()
The code in g_wakeup_signal() is currently correct: it writes a 64-bit
counter increment value if the FD is an eventfd, and writes an arbitrary
8-bit value if using a normal pipe.

However, the reasoning behind these buffer sizes is not clear, and the
mismatch between the allocated buffer size and the length passed to
write() in the pipe case could be mistaken for a bug.

Coverity issue: #1159490

https://bugzilla.gnome.org/show_bug.cgi?id=732002
2014-06-21 17:41:31 +01:00
Zeeshan Ali (Khattak)
eb6da409fa docs: Correct param to interface's default_init()
https://bugzilla.gnome.org/show_bug.cgi?id=731979
2014-06-21 12:18:58 +01:00
Michael Catanzaro
d552a1f125 docs: fix a broken sentence 2014-06-20 16:44:59 -05:00
Ryan Lortie
9362a1b2d9 configure.ac: fix check for futex and eventfd
We were using AC_LANG_PROGRAM to build a program to test for our ability
to call syscall (__NR_futex, ...);.  This macro adds "main () { ... }"
around the provided code segment automatically.  The provided code
segment provided its own main() function, however.

The result looked something like:

int main (void) {
  int main (void) {
    ...
  }
}

which worked on GCC, but not on clang.

Let's fix that.  Let's fix the same mistake copied over for eventfd()
detection while we're at it.
2014-06-20 16:00:48 -04:00
Ryan Lortie
bef557e55d gatomic: disable GCC extension atomics for clang
clang defines the macro that we use to test for GCC's extension support
for C11 atomics, but doesn't define the extension in the same way.
Check for clang and disable the macros again if we find it.

https://bugzilla.gnome.org/show_bug.cgi?id=731513
2014-06-20 16:00:48 -04:00
Matthias Clasen
7991178a75 Try to make gobject.py work with both pythons
This change was suggested on the fedora test list, and has been
reported to work.
2014-06-16 15:25:42 -04:00
Erik van Pienbroek
9f69534030 Prevent an invalid @CARBON_LIBS@ from appearing in the .pc files
Fixes static linking when using the glib pkgconfig file.
Regression was introduced in commit 8d037c6 (bz #668152)

https://bugzilla.gnome.org/show_bug.cgi?id=731657
2014-06-14 14:21:37 -04:00
Tim-Philipp Müller
94e13c71c5 gio/tests/socket: fix minor memleak 2014-06-13 19:32:09 +01:00
Colin Walters
09498e52bb gparam: Remove unnecessary conditionals around preconditions
These cause a static analyzer to think we're trying to actually handle
them being NULL, which is not the case.  They both must not be NULL,
period.

No idea why the code was like this originally.

Reviewed by mclasen on IRC.
2014-06-12 13:38:27 -04:00
Colin Walters
f7d7e5ab2f gbookmarkfile: Cleaner error handling code to pacify static analysis
A static analyzer flagged the g_file_get_contents() call as not
checking its return value.  While the code here is actually correct,
it's verbose at best.

I think the "goto out + cleanup" code style is substantially cleaner,
less error prone, and easier to read.  It also will pacify the static
analyzer.

https://bugzilla.gnome.org/show_bug.cgi?id=731584
2014-06-12 13:25:06 -04:00