Commit Graph

16857 Commits

Author SHA1 Message Date
Matthias Clasen
61136c2c73 Trivial doc comment fix
Use the same Since: syntax throughout.
2015-12-14 07:43:24 -05:00
Andrey Gursky
e9c9ff607c Add missing checks for gnulib vasnprintf()
Commit 212e4232e7 introduced a big update
of gnulib. Necessary changes to configure.ac from old gnulib commit
e8e63d1b31bca6c82713cba490b21a861abb24b5 have been forgotten. Actually
available functions are not discovered by autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=759134
2015-12-07 20:52:10 -05:00
Sebastian Rasmussen
b3e0caa3e3 Updated Swedish translation 2015-12-02 21:12:12 +00:00
Chun-wei Fan
244f9e66f9 build/win32: Add NMake Makefile module for building tests and introspection
This adds a NMake Makefile module that can be used for building tests and
introspection using, NMake.  This is not yet distributed in the main GLib
tarballs, but this is placed here as the base location as this is
intended to be used in projects that support Visual Studio builds and
support the build of tests and/or introspection under Visual Studio using
NMake.
2015-12-02 21:23:10 +08:00
Chun-wei Fan
80dcec234c config.h.win32.in: Clean up a bit
Remove the HAVE_*INLINE items from here as well, since 'inline' is
unconditionally defined in gmacros.h.
2015-12-02 21:04:43 +08:00
Emmanuele Bassi
a81568273c docs: Be more precise on the use of set_resource_base_path()
The current wording is a bit vague on when to call
set_resource_base_path() in a GApplication implementation.
2015-12-01 12:57:02 +00:00
Chun-wei Fan
cfdd4cabe7 glib/glibconfig.h.win32.in: Clean up a bit further
Also get rid of the items regarding G_HAVE_*INLINE as they aren't used
anymore as they are removed from configure.ac.

Thanks to John Emmas and desrt for the earlier patch for getting
rid of the C4005 warnings.
2015-11-30 11:22:17 +08:00
Allison Ryan Lortie
f2fb877ef7 glibconfig.h.win32.in: remove G_CAN_INLINE
We now define this unconditionally in gmacros.h.

Thanks to John Emmas for the tip.

https://bugzilla.gnome.org/show_bug.cgi?id=757374
2015-11-27 11:31:41 -05:00
Allison Ryan Lortie
ec6971b864 gtypes.h: move G_STATIC_ASSERT to function scope
It seems that some compilers get upset if this is done at global scope,
so let's move it to function scope where we know it works.
2015-11-27 11:27:51 -05:00
Allison Ryan Lortie
a266ac62ea tests: fix a test on 32-bit builds
We were trying to squeeze 64-bit test vectors into gsize, which is fine
on 64bit systems but doesn't work very well on 32-bit.

Change that to a guint64.
2015-11-26 09:26:45 -05:00
Matthias Clasen
9787790448 GApplication: improve docs
Spell out which GVariant format strings to use for which
commandline option types. I just wasted some time debugging
this in an application.
2015-11-25 21:38:20 -05:00
Evangelos Foutras
db641e3292 GDBusProxy: Fix a memory leak during initialization
https://bugzilla.gnome.org/show_bug.cgi?id=758641
2015-11-25 17:33:11 -05:00
Allison Ryan Lortie
be225b76a7 GLib 2.47.3 2015-11-25 09:41:49 -05:00
Allison Ryan Lortie
ba12fbf8f8 gutils: g_bit_ inlines: add visibility macros
My careful efforts to preserve the exporting of these symbols on our ABI
was thwarted by our symbol visibility filtering.  Let's fix that.
2015-11-25 08:48:53 -05:00
Allison Ryan Lortie
4f18c671ab GLib 2.47.2 2015-11-24 19:44:46 +00:00
Allison Ryan Lortie
398c048c66 docs: remove GDBusObjectManager example
This example has been causing on-and-off build breaks for quite some
time.  In this case, the code for copying the generated content into the
main docs of GIO is causing problems with srcdir != destdir builds (due
to the files also being copied from the read-only srcdir during
distchecks).

We could probably work around this problem yet again, but since there is
no real benefit to having this content included, so let's remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=734469
2015-11-24 18:44:02 +00:00
Tom Tryfonidis
69003a0751 Updated Greek translation
(cherry picked from commit bf0f0135a3)
2015-11-23 14:58:49 +00:00
Allison Ryan Lortie
7bc6f021d7 gmacros: fix unguarded use of __STDC_VERSION__
According to the C spec, any undefined identifier used in a #if
expression is taken to have a numerical value of zero.

Commit db2367e878 introduced an #i
statement which depended on this behaviour.

gcc has a -Wundef option which warns about depending on this behaviour,
and unfortunately there are projects that are using -Werror=undef in
builds that include our headers.

Adding a check for defined(__STDC_VERSION__) before using the macro is
enough to silence gcc.
2015-11-17 13:43:49 -05:00
Daniel Mustieles
1ee2db4a28 Updated Spanish translation 2015-11-17 18:48:06 +01:00
Dan Winship
f87e002313 Fix g_strerror() on non-glibc
When using one of the codepaths that copies the error string into buf,
make sure the string gets strdup() afterward.

https://bugzilla.gnome.org/show_bug.cgi?id=758194
2015-11-16 16:57:38 -05:00
GNOME Translation Robot
03cb2eb088 Added Scottish Gaelic translation 2015-11-16 18:20:41 +00:00
Allison Ryan Lortie
db2367e878 GLib: clean up the "inline" mess once and for all
It's been a long time since we've been unconditionally saying "static
inline" in GLib headers without complaints so it's safe to assume that
all compilers that we care about support this.

One thing that is not yet totally supported is the unadorned use of the
word "inline".  Depending on the flags (-std=c89, for example), even GCC
will complain about this.  Detect missing C99 support and define
"inline" to "__inline" in that case.  Some research shows "__inline"
appears to be the most widely-supported keyword here, but we may need to
tweak this if we get some reports of breakage.

Clean up all of the configure checks around this and define G_CAN_INLINE
unconditionally.  Unfortunately, we must assume that some people are
still using G_IMPLEMENT_INLINES, we must continue to implement that
(including undefining G_CAN_INLINE and redefining G_INLINE_FUNC) if
requested.

It is not our intent to break existing users of the old-style
G_INLINE_FUNC approach and if that has happened, we may need to make
some further adjustments.

https://bugzilla.gnome.org/show_bug.cgi?id=757374
2015-11-16 13:14:19 -05:00
Allison Ryan Lortie
9834f79279 gutils: clean up bit funcs inlining mess
gutils.h and gutils.c define three utility functions as inlines that are
also exported via the ABI.  This is done via complicated G_INLINE_FUNC
and G_IMPLEMENT_INLINES logic.

In order to be able to remove this mess, we create a another convoluted
but slightly cleaner approach: write straight-up inline versions of the
functions named _impl() in the header.  Define macros with the "public"
function names that call these inlines.  From the .c file, export the
ABI versions of these functions, implemented using the _impl() version.

https://bugzilla.gnome.org/show_bug.cgi?id=757374
2015-11-16 13:14:19 -05:00
Allison Ryan Lortie
0bfbb0d257 GTrashStack: uninline and deprecate
Deprecate GTrashStack and remove the inline implementations for the
functions.  This will help us clean up the mess that is inline functions
in GLib.

Because of how G_INLINE_FUNC worked, we have these functions on our ABI,
so we must continue to export them as normal functions.  We are safe to
remove the inline versions, however, because any existing binaries will
continue to carry them and any new builds will just start using the
non-inline versions.

https://bugzilla.gnome.org/show_bug.cgi?id=757374
2015-11-16 13:14:19 -05:00
Ben Iofel
7ab79b3879 GTask: fix example code in docs
https://bugzilla.gnome.org/show_bug.cgi?id=758181
2015-11-16 12:33:02 -05:00
Kjartan Maraas
448e01353a Updated Norwegian bokmål translation. 2015-11-15 23:59:35 +01:00
Chun-wei Fan
c50bb218de MSVC 2010+ builds: Do not explicitly use /LTCG
This partially reverts dc4361f.

As we now ensure that items using GResources and GConstructors are always
referenced so that the linker does not optimize them out in a default
Release build, we no longer need to enforce the use of /LTCG, so
/LTCG:incremental will work as well.
2015-11-12 15:26:20 +08:00
Chun-wei Fan
db4df9908e gconstructor: Work around constructors being optimized away on MSVC
Whole program optimization is enabled by default in visual studio
release builds, and this causes constructors (for e.g. resources) to be
optimized away as they are not referenced from elsewhere.

This works around this by some pragma magic.

https://bugzilla.gnome.org/show_bug.cgi?id=752837
2015-11-12 15:01:54 +08:00
Jeff Bai
228ad1ed9c Update zh_CN translations 2015-11-12 11:02:56 +08:00
Mikhail Zabaluev
0a10d38d15 Return value of g_hash_table_get_{keys,values} is (transfer container)
https://bugzilla.gnome.org/show_bug.cgi?id=757742
2015-11-07 18:55:17 +02:00
Mikhail Zabaluev
42463b840f ghash: Correctly annotate (nullable) and (out) parameters
https://bugzilla.gnome.org/show_bug.cgi?id=757742
2015-11-07 18:55:17 +02:00
Balázs Úr
0e53659971 Updated Hungarian translation 2015-11-07 15:08:05 +00:00
Philip Withnall
779b5c9af0 gtestutils: Fix a function name in a documentation example 2015-11-07 13:55:24 +01:00
Philip Withnall
25a7c817d3 glib: Add missing (nullable) and (optional) annotations
Add various (nullable) and (optional) annotations which were missing
from a variety of functions. Also port a couple of existing (allow-none)
annotations in the same files to use (nullable) and (optional) as
appropriate instead.

Secondly, add various (not nullable) annotations as needed by the new
default in gobject-introspection of marking gpointers as (nullable). See
https://bugzilla.gnome.org/show_bug.cgi?id=729660.

This includes adding some stub documentation comments for the
assertion macro error functions, which weren’t previously documented.
The new comments are purely to allow for annotations, and hence are
marked as (skip) to prevent the symbols appearing in the GIR file.

https://bugzilla.gnome.org/show_bug.cgi?id=719966
2015-11-07 10:48:32 +01:00
Sebastien Bacher
90808a0279 g_local_file_trash: remove invalid free call
Commit 8ece2de964 transplanted a block of
code that contained an early-exit-on-error case which freed several
variables.

Because of the move, the normal-path unconditional free of one of these
variables is now above this early exit case, so if this block is hit, it
will now be a double-free.

Remove that.

https://bugzilla.gnome.org/show_bug.cgi?id=757693
2015-11-06 11:55:57 -05:00
Philip Withnall
1ac2a606fc gtlsconnection: Fix a typo in the documentation 2015-11-06 11:27:24 +01:00
Dan Winship
751d3f00a8 Update .gitignore for overflow tests 2015-11-05 09:42:36 -05:00
Jan de Groot
4d74ca4c3a Make gtester-report compatible with Python 3
Convert tabs to spaces and replace print with print().
The script still works with Python 2.x.

https://bugzilla.gnome.org/show_bug.cgi?id=696324
2015-11-05 12:53:19 +01:00
Jussi Kukkonen
1c6e6671d1 gio/tests: Don't depend on a data file that's not built
data.gresource is not built when cross-compiling: Don't
add it to test_data in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=757628
2015-11-05 13:50:13 +02:00
Pedro Albuquerque
503e314748 Updated Portuguese translation 2015-11-05 05:58:56 +00:00
Simon McVittie
236e8040b4 Build gdbus-example-objectmanager-server again
It was removed, apparently accidentally, in commit 5b48dc4.
This had the side-effect that it wasn't included in tarball releases,
which means that commit ab7b4be doesn't work when building a package.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=734469
Reviewed-by: Colin Walters <walters@verbum.org>
2015-11-02 20:36:42 +00:00
Mikhail Zabaluev
0dbc81c73a Move G_POLLFD_FORMAT to glibconfig.h
It's a platform-specific macro, so it belongs in glibconfig.h.
This ensures that g-ir-scanner will not pick the wrong definition
for introspection.

https://bugzilla.gnome.org/show_bug.cgi?id=757294
2015-11-02 20:03:38 +02:00
Xavier Claessens
6f1b574cea Doc: Fix missing glibconfig.h when builddir!=srcdir
Currently the doc is incomplete when builddir!=srcdir
(e.g. debian package) because glibconfig.h is generared from
configure.ac and is thus missing from srcdir. This leads to
missing doc for symbols like G_GINT64_FORMAT.

https://bugzilla.gnome.org/show_bug.cgi?id=734469
2015-11-02 10:02:43 -05:00
Xavier Claessens
86a7c864b3 Doc: copy included example files
This fix missing files when src_dir != build_dir.

https://bugzilla.gnome.org/show_bug.cgi?id=734469
2015-11-02 09:26:58 -05:00
Lars Uebernickel
ee718d3526 gapplication: reject actions without names
https://bugzilla.gnome.org/show_bug.cgi?id=756134
2015-11-02 13:52:10 +01:00
Daiki Ueno
863bffdac7 doc: fix g_task_attach_source() example
The 3rd argument of the function is not a GCallback, but a GSourceFunc.

https://bugzilla.gnome.org/show_bug.cgi?id=757451
2015-11-02 11:14:04 +09:00
Xavier Claessens
df352203d6 Stop using g_sequence_get_length() to check if it's empty
g_sequence_is_empty() is more efficient for that task.

https://bugzilla.gnome.org/show_bug.cgi?id=756988
2015-10-30 11:35:28 -04:00
Xavier Claessens
2bc32606c7 GSequence: document that _get_length() is not O(1)
https://bugzilla.gnome.org/show_bug.cgi?id=756988
2015-10-30 11:35:27 -04:00
Xavier Claessens
2331437df3 Doc: fix some gtk-doc warnings
https://bugzilla.gnome.org/show_bug.cgi?id=755364
2015-10-30 10:30:55 -04:00
Allison Ryan Lortie
7dd9ffbcff tests: test bounds-checked int arithmetic
Add some simple testcases for the new bounds-checked integer arithmetic
helpers.

Include a second build of the testcase to make sure we test the fallback
code even if we are on a compiler that supports the intrinsics.

https://bugzilla.gnome.org/show_bug.cgi?id=503096
2015-10-30 11:58:49 +01:00