Commit Graph

2659 Commits

Author SHA1 Message Date
Christian Persch
41b3f6885d Add g_dc[p]gettext, and use it in gsettings
Avoid using LC_MESSAGES, and just call g_d[c]gettext directly.

Bug #617004.
2010-05-20 21:16:29 +02:00
Ryan Lortie
4967b6d2ab gitignore additions for gdbus, new test cases 2010-05-17 07:16:37 -04:00
Ryan Lortie
c57c61c930 fix glaring inaccuracy in GVariant docs 2010-05-14 17:08:01 +02:00
Sebastian Dröge
936ff022f2 Don't include __bss_start, _edata and _end symbols in the abichecks
They are added by the binutils gold linker.
2010-05-11 06:17:25 +02:00
Robert Bragg
03b5db4477 gtester-report: cope with binaries with no test cases
It's possible that a given binary may conditionally decided not to run
any test cases (e.g. since they are all slow but -m=quick is currently
in use) In this case the xml may contain <testbinary> nodes with no
<testcase> children. This was resulting in a divide by zero when
calculating the green → red color interpolation.

https://bugzilla.gnome.org/show_bug.cgi?id=617914
2010-05-09 16:28:32 +01:00
Simon McVittie
6bea235c8b Support 64bit integers in GKeyFile 2010-05-08 21:30:27 -04:00
Matthias Clasen
c13c36e3b9 Add test for g_get_language_names 2010-05-08 20:58:10 -04:00
Javier Jardón
81e98c399e Clean Glib header #include issues: gthread 2010-05-06 17:42:09 +02:00
Javier Jardón
c7940d8180 Clean Glib header #include issues: gmem 2010-05-06 17:42:09 +02:00
Javier Jardón
21302a741c Clean Glib header #include issues: gtestutils 2010-05-06 17:42:09 +02:00
Javier Jardón
d1642386c9 Clean Glib header #include issues: gasyncqueue 2010-05-06 17:42:09 +02:00
Christian Persch
4c10cad661 Add API to get the compile and match flags from a GRegex
Bug #616967.
2010-05-01 13:57:11 +02:00
Alexander Larsson
270a954b54 Allocate quarks in chunks to avoid overhead and fragmentation
See bug 616720 for some measurements.
2010-04-27 10:12:25 +02:00
Ryan Lortie
cd062e841f docs and glib.symbols update 2010-04-25 20:08:59 -05:00
Ryan Lortie
a52b6f7df2 Add g_variant_{new,get}_byte_array()
Now that strings are strictly utf8 this provides a convenient API for
storing non-utf8 string data.
2010-04-25 19:12:14 -05:00
Ryan Lortie
9eeab5868f GVariant: strings are now utf8
- modify serialiser validation function to enforce utf8 encoding
 - add documentation to g_variant_new_string(), g_variant_get_string(),
   g_variant_dup_string()
 - add 2 new test cases to check that it works
2010-04-25 13:39:20 -05:00
Emmanuele Bassi
38e2273207 Add G_GNUC_DEPRECATED_FOR macro
It would be good, error reporting-wise, to be able to signal which
function should be used instead of a deprecated one. GCC 4.5 added an
optional "message" payload to the deprecated attribute, so that:

  void f1 (void) __attribute__((deprecated("Use f2 instead")));

Will expand to:

  warning: f1 is deprecated: Use f2 instead

Instead of just printing:

  warning: f1 is deprecated

Since we already have a G_GNUC_DEPRECATED macro we should provide a
G_GNUC_DEPRECATED_FOR macro defined as:

  G_GNUC_DEPRECATED_FOR(bar)

Which would expand the deprecation message to "Use bar instead"
automatically. The deprecation message should probably be similar
to what we use in gtk-doc to match up with the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=614965
2010-04-23 15:26:49 +01:00
Matthias Clasen
b2ee97d00d Fix up g_variant_compare addition 2010-04-22 20:49:20 -04:00
Behdad Esfahbod
00a7c2e635 Bug 615379 - g_new macros crash if sizeof(struct_type) == 0 2010-04-22 19:48:45 -04:00
Ryan Lortie
5445ae78c2 Add g_variant_compare() for like basic types 2010-04-20 10:37:58 -04:00
Matthias Clasen
48cd4cbba5 Silence a warning
g_string_insert_len (s, pos, NULL, 0) is a harmless nop, don't
spew warnings in this case.
2010-04-18 23:53:31 -04:00
Lars Ellenberg
bf2719c815 Cast to volatile to avoid warnings from -Wcast-qual
https://bugzilla.gnome.org/show_bug.cgi?id=457641
2010-04-15 19:03:05 +02:00
Ryan Lortie
056326c1e9 g_string_append_len() accept NULL with length == 0 2010-04-15 10:11:30 -04:00
Ryan Lortie
d17f4bee17 GVariant: fix for g_variant_iter_loop() 2010-04-14 23:36:23 -04:00
Ryan Lortie
3349bab022 Add g_return_if_fail()s to g_variant_new_from_data()
also, document that @type must be definite
2010-04-10 22:01:02 -04:00
Behdad Esfahbod
93ea4ab610 Improve docs 2010-03-31 10:55:00 -04:00
Tor Lillqvist
f8470ed55a Fix build breakage on Unix 2010-03-30 20:46:46 +03:00
Tor Lillqvist
1229281d95 Define a public documented type for the struct stat used by g_stat()
Define GStatBuf as the type used by g_stat() and g_lstat(). Replaces
the non-public struct tag _g_stat_struct. Mostly relevant for Windows
where there are several variants of stat-style structs. On POSIX, is
just another name for struct stat.

Actually, also on many POSIX systems there are in fact several
variants of struct stat and corresponding stat() and lstat()
functions, but as g_stat and g_lstat are normally on POSIX just macros
that expand to stat and lstat, this should not cause a problem. It's
only when it's the actual g_stat() or g_lstat() implementation inside
GLib that gets called that one needs to be sure the passed struct is
the same as what GLib expects.)
2010-03-30 19:22:39 +03:00
Ryan Lortie
409a3a61ec GVariant: Stop lexing format strings at :
Lets us parse this successfully: {%s: %s}.
2010-03-26 08:02:17 -05:00
Ryan Lortie
a6c57591c0 Support &s as key of dict entry in format string
Partial fix for bug 613618.
2010-03-23 09:18:28 -05:00
Tor Lillqvist
440713e393 Filter out gatomic-gcc.c from the VS project sources
Instead, explicitly include gatomic.c.
2010-03-22 15:55:11 +02:00
Ryan Lortie
db83dd27c5 Drop { } for favour of { 0, }. 2010-03-21 20:12:18 -05:00
Ryan Lortie
5620f96305 silence some false-alarm uninitialised warnings 2010-03-21 14:17:21 -05:00
Ryan Lortie
6f33038397 gtk-doc fixups 2010-03-21 14:12:48 -05:00
Ryan Lortie
c5a1c95b1f GVariant docs fixes 2010-03-21 13:46:09 -05:00
Ryan Lortie
bf4dbdbf0e merge GVariant parser 2010-03-21 12:55:30 -05:00
Tor Lillqvist
226cc663e4 Avoid much of duplication in lists of source files
Don't keep the lists of source files for libglib, libgobject and
libgio in the VS project files in addition to the canonical location,
the corresponding Makefile.am files.

Instead, generate the corresponding .vcproj files at make dist time
using the C preprocessor, from template files called .vcprojin. We
still list explicitly in the .vcprojin files some of the
Windows-specific source files, and the sources files of gnulib and
pcre.
2010-03-21 16:15:02 +02:00
Tor Lillqvist
2ab76c5b36 Make the GVariant code compile with a non-gcc compiler
In particular, tested with Microsoft Visual C 2008.
2010-03-21 11:22:06 +02:00
Benjamin Otte
2295ba857f The fallback parameter to g_convert_with_fallback() should be const
This patch makes it so.
2010-03-16 16:40:04 +01:00
Ryan Lortie
751feb916a Bug 612502 - build fails on glib/tests/gvariant.c
Fix two problems caught by Tim Rice.

  - non-constant expression used as array size
  - arithmetic on void *
2010-03-15 17:45:02 -04:00
Christian Persch
1953b4087f Use static assert over runtime assert if possible
We can test the these at compile time. Bug #609231.
2010-03-15 15:49:03 -04:00
Ryan Lortie
7e4d88b290 gvariant test: Remove unused variable 2010-03-14 22:27:39 -04:00
Ryan Lortie
9dea0253a3 GVariant: add loading, byteswapping, normalisation 2010-03-14 15:56:18 -04:00
Ryan Lortie
1ac590b7f7 GBuffer: very small cosmetic fix to header file 2010-03-14 15:56:18 -04:00
Ryan Lortie
056feef60b GVariantIter: expand the size of the dummy struct
Will allow for some nice tricks in the future.
2010-03-14 15:56:17 -04:00
Ryan Lortie
5b19345246 Bug 610858 - gvariant test fails sometimes
NaN floating point values get mangled when passing across the function
call ABI on x86 so avoid using them to get rid of spurious failures.

Reported by Christian Persch and reliably reproduced by Emilio Pozuelo
Monfort.
2010-03-12 15:42:22 -05:00
Javier Jardón
1caaa4f591 [docs] Don't reference deprecated functions
Use g_io_add_watch(), g_io_add_watch_full() and
g_source_remove() instead the deprecated gtk_input_add_full(),
gtk_input_remove(), gdk_input_add(), gdk_input_add_full() and
gdk_input_remove()
2010-03-10 05:06:50 +01:00
Ryan Lortie
a85b9c4bad 'default: g_assert_not_reached();' to silence GCC
Closes bug #612327 reported by Claudio Saavedra.
2010-03-09 13:34:00 -05:00
Dagobert Michelsen
89fa967ba1 Use G_STRFUNC instead of explicit gcc-only __PRETTY_FUNC__ 2010-03-09 10:30:06 -05:00
Behdad Esfahbod
c69e6fd837 Cosmetic 2010-03-08 14:33:38 -05:00