3038 Commits

Author SHA1 Message Date
Martin Nordholts
37858f7f5e Check availability of linux/magic.h
Check availability of linux/magic.h. It isn't available in Linux
versions before 2.6.19.
2011-03-08 19:13:57 +01:00
Matthias Clasen
121ce56fe1 Go back to the old logic in set_expiration
It was more complicated, but also more correct...
Also add a test to ensure that our rounding works as expected.
https://bugzilla.gnome.org/show_bug.cgi?id=643795
2011-03-06 22:38:17 -05:00
Ryan Lortie
d2a2fe96a3 GVariant docs cleanups
Fix some gtk-doc warnings
2011-03-04 00:57:51 -05:00
Ryan Lortie
be04e514c0 GVariant: add G_VARIANT_TYPE_VARDICT for a{sv} 2011-03-04 00:45:14 -05:00
Matthias Clasen
c430ad0b1b Add some tests for g_hash_table_lookup_extended 2011-02-25 10:41:29 -05:00
Matthias Clasen
d2d756439f GHashTable: Clarify g_hash_table_lookup_extended docs
Passing NULL as a key is only ok if your hash and equal functions
can deal with it.
https://bugzilla.gnome.org/show_bug.cgi?id=642944
2011-02-25 10:40:39 -05:00
Matthias Clasen
52ef73ac8c GOptionContext: Warn about invalid arg/flag combinations
This was proposed by Kjell Ahlstedt in bug 642825.
Also adding a few tests for this new behaviour.
2011-02-25 10:10:37 -05:00
Matthias Clasen
ee9e38ef68 Treat optional arguments the same for long and short options
This was noticed in bug 642825 and the change was proposed
by Kjell Ahlstedt.
2011-02-25 08:45:28 -05:00
Chun-wei Fan
701ac3cb3d Fix the VS2010 project generation for GLib
The scripts accently pick up gcc-only source files... this fixes that.
2011-02-24 12:38:51 +08:00
Andreas Rottmann
fdfb09a793 Bug 638185 - GIOCondition should be annotated as "flags"
Add a gtk-doc annotation to GIOCondition marking it as a flags type.
2011-02-22 15:12:30 +01:00
Chun-wei Fan
7b118b0c41 Visual C++ 2010 Project Files: autotools files
These are the updates to the autotools files to
ensure the expansion of the GIO, GLib and GObject
project files (*.vcxproj, *.vcxproj.filters) and to
enable the distribution of the VS2010 project files

The actual VS2010 project files will follow shortly
2011-02-22 19:58:18 +08:00
Tor Lillqvist
1158f9c171 Export _glib_get_locale_dir() as it is now used in gio, too 2011-02-20 01:30:51 +02:00
Matthias Clasen
4cda703d8e Use glibc qsort_r() for g_qsort_with_data()
No point in using an outdated copy that claims to
'work best on a Sun 4/260' when we can just wrap qsort_r...
2011-02-16 01:28:27 -05:00
Damien Lespiau
59cbb3a8a3 gtimezone: Rename shadowing variable 'time' to 'time_' 2011-02-15 21:55:38 -05:00
Matthias Clasen
b21b3a01c7 Fix bug base in array-test 2011-02-15 00:03:19 -05:00
Matthias Clasen
a46885242b Add a testcase for bug 640489 2011-02-15 00:03:19 -05:00
Ryan Lortie
c2fbef4125 Bug 642052 - g_timeout_add(_seconds) overflow
Fix integer overflow error.
2011-02-14 23:23:33 -05:00
Ryan Lortie
10154d21f0 Bug 642052: add currently-broken test case
The test case fails for now.  It will be fixed by the next commit.
2011-02-14 23:23:33 -05:00
Matthias Clasen
309f5f978b Improve test coverage
Various test additions, mainly in GObject
2011-02-13 23:49:19 -05:00
Matthias Clasen
147139d968 Use g_assert_no_error
The option-context test had its own version.
2011-02-13 23:49:18 -05:00
Benjamin Otte
562f29afdc doc: Fix typo in previous commit
Yuck. I blame it on the weekend.
2011-02-12 18:05:54 +01:00
Benjamin Otte
17eea8fa60 docs: Fix return value for g_datetime_compare()
Previous code confused dt1 and dt2. The new formulation is stolen from
man strcmp() and g_strcmp0().
2011-02-12 17:56:34 +01:00
Ryan Lortie
ea4e3ea1cb GVariant: doc the format of g_variant_parse/print 2011-02-11 13:53:10 -05:00
Ryan Lortie
b1d02f9323 GVariant: support NULL for empty arrays in varargs
g_variant_new("as", NULL); now gives an empty array of strings, for
example.

This was documented as working already, but was never actually
implemented (due to the fact that it muddies the water when considering
maybe types).  It's being implemented now because its convenience to
programmers exceeds any damage done to the conceptual purity of the API.
2011-02-11 10:14:29 -05:00
Matthias Clasen
78dcafc5cb Fix some parameter mismatches in GVariant docs 2011-02-08 10:04:36 -05:00
Matthias Clasen
4368a07e02 Avoid more compiler warnings 2011-02-08 07:41:49 -05:00
Matthias Clasen
8d572f5d22 g_date_time_format: drop an unused variable 2011-02-08 07:35:54 -05:00
Javier Jardón
a0554a9f76 docs: Document Since properly, 2.26 -> 2.28 2011-02-08 02:27:44 +00:00
Johan Dahlin
fdaaa22b58 Correct gtk-doc SECTION: syntax
g-ir-scanner does not allow a space between the : and the
section name.
2011-02-01 16:18:02 -02:00
Ignacio Casal Quinteiro
401a4233e4 Check that error exists before trying to set it. Fixes bug #640975. 2011-01-31 13:34:26 +01:00
Dan Winship
3c59c38404 Fix g_source_add_child_source docs
https://bugzilla.gnome.org/show_bug.cgi?id=640823
2011-01-28 10:18:42 -05:00
Ryan Lortie
d4209c1c41 GVariant: clear memory before releasing it
Bug #640807 makes a reasonable case for why it's better to have your
program crash outright in the case of memory errors.  With this
modification, GVariant is far more likely to do that in the case that a
GVariant pointer is used shortly after being freed.
2011-01-28 08:25:05 -05:00
Tobias Mueller
8602a3a682 Fixed format string issue in a test, fixes bug 640725 2011-01-27 23:10:02 -05:00
Matthias Clasen
069daa69f6 Add testcase for bug 640695 2011-01-27 23:07:53 -05:00
Benjamin Gilbert
440e6f4a61 Ensure g_key_file_load_from_file() strips a \r on a 4 KB boundary
When g_key_file_parse_data() encountered \n, it was checking the previous
character in the current input buffer for a \r to erase, rather than the
previous character in the parse buffer.  If g_key_file_load_from_file()
was given a file with a \r\n sequence straddling a 4 KB boundary, the \n
would be the first character in the input buffer, so the \r would not be
properly stripped.

Bug #640695.

Found-by: Jan Harkes <jaharkes@cs.cmu.edu>
2011-01-27 23:06:15 -05:00
Matthias Clasen
cc5578fbd7 Make load_user_special_dirs() resistant to nonexistent dirs 2011-01-27 21:57:57 -05:00
Matthias Clasen
fb2809ec99 Forgotten files 2011-01-22 00:01:54 -05:00
Matthias Clasen
3f059a6a12 Remove a test that seems to fail depending on time of day 2011-01-21 23:41:12 -05:00
Matthias Clasen
c03dc6bf7d Update the included copy of PCRE
Update PCRE to version 8.12.
At the same time, also add Unicode 6.0 script support.
2011-01-21 23:10:01 -05:00
Behdad Esfahbod
0a57086540 Update to Unicode 6.0
One new GUnicodeBreak enum member.  Three new GUnicodeScript members,
and one member renamed to fix a typo.

Tests, docs, and scripts are updated.  PCRE update still needed.
2011-01-21 16:30:19 -05:00
Matthias Clasen
c7f38cd277 Mark another function as static 2011-01-18 00:06:55 -05:00
Matthias Clasen
67e112cce6 Mark a function as static 2011-01-18 00:06:05 -05:00
Matthias Clasen
d2347f34fd Move GMarkup docs inline 2011-01-17 23:46:20 -05:00
Ray Strode
e8120dc4ce datetime: Show 12 instead of 0 for 12h hour format
The 12h mode hour format is computed by taking the
24h mode hour format modulo 12.

The conversion results in 12 noon getting erroneously
converted to 0.

This commit makes noon get the same special handling
as midnight.
2011-01-17 14:31:34 -05:00
Ray Strode
a437c5e768 tests: add format test case for noon hour in 12h mode
It currently displays it as "0" instead of "12", so this
test case demonstrates the bug.
2011-01-17 14:31:34 -05:00
Javier Jardón
a583405f66 docs: gvariant-core: g_variant_normalise -> g_variant_get_normal_form() 2011-01-14 17:54:04 +00:00
Javier Jardón
6c0491841e gvariant-core: Fix typo
g_variant_create_from_data -> g_variant_new_from_data
2011-01-14 17:25:07 +00:00
Matthias Clasen
b67d9cb7ee Add regex test cases
These come from https://bugzilla.gnome.org/show_bug.cgi?id=638894
2011-01-07 12:07:19 -05:00
Matthias Clasen
51ac0c6c85 Avoid possible parameter name clashes in GVariant
https://bugzilla.gnome.org/show_bug.cgi?id=638349
2011-01-05 19:42:13 -05:00
Christian Persch
3d824065b8 Add g_get_locale_variants()
Make _g_compute_locale_variants() public as g_get_locale_variants().

Bug #635998.
2011-01-05 22:57:20 +01:00