Commit Graph

1263 Commits

Author SHA1 Message Date
Ryan Lortie
f2f66bfe45 docs: warn about installing properties after init
Leave ourselves a little wiggle room: if people install properties after
initialisation then we reserve the right to handle that in a way that
may not be threadsafe.

https://bugzilla.gnome.org/show_bug.cgi?id=698614
2014-06-06 16:44:47 -04:00
Ryan Lortie
85e9455f68 Revert "GObject: prevent installing properties after init"
This reverts commit ddb0ce1421.

Conflicts:
	gobject/gobject.c

https://bugzilla.gnome.org/show_bug.cgi?id=698614
2014-06-06 16:44:47 -04:00
Ryan Lortie
d558e87c65 gtype: guard uses of new fundamental type check
g_type_is_fundamentally_a (see bug 730984) is a new API/ABI and is
marked with a version macro.  We should therefore avoid its
unconditional use from G_IS_OBJECT() and G_IS_PARAM_SPEC() which are
APIs that have been around for a long time.

This prevents deprecation warnings from being emitted when these
functions are used with an older GLIB_VERSION_MAX_ALLOWED and also
prevents linking to the new ABI in that case (so that it's possible to
use the resulting binary with an older version of GLib).

https://bugzilla.gnome.org/show_bug.cgi?id=731335
2014-06-06 10:49:29 -04:00
Ryan Lortie
0208861a13 test: add test for explicit-notify properties
https://bugzilla.gnome.org/show_bug.cgi?id=731200
2014-06-06 10:25:48 -04:00
Ryan Lortie
bbdb2345fc gobject: add 'explicit notify' GParamSpec flag
Add a flag to prevent the automatic emission of the "notify" signal
during g_object_set_property().

If this flag is set then the class must explicitly emit the notify
for themselves.  This is already standard practice on most classes, but
we cannot simply remove the existing behaviour because there are surely
many cases where it is needed.

https://bugzilla.gnome.org/show_bug.cgi?id=731200
2014-06-06 10:25:48 -04:00
Matthias Clasen
adfaf0e456 docs: GType documentation cleanup
Still some markup left.
2014-05-31 20:55:00 -04:00
Emmanuele Bassi
24ab95582b docs: Replace <function> XML tag with back ticks
https://bugzilla.gnome.org/show_bug.cgi?id=731050
2014-05-31 19:22:15 +01:00
Matthias Clasen
ab18d71e6f Minor documentation additions and corrections
Going for 100%.
2014-05-31 10:54:02 -04:00
Matthias Clasen
ad5b4bf92e Document g_signal_handlers_destroy 2014-05-31 10:54:02 -04:00
Edward Hervey
f8595a490f GParamSpec: Use new fundamental instance check
https://bugzilla.gnome.org/show_bug.cgi?id=730984
2014-05-31 15:46:21 +02:00
Edward Hervey
faceb8960b gobject: Use fast fundamental instance type check
Speeds up g_object_ref/_unref by 50%-65% (i.e. takes 60-65% of the time
it used to take).

https://bugzilla.gnome.org/show_bug.cgi?id=730984
2014-05-31 15:46:21 +02:00
Edward Hervey
6072e3650f gtype: Add check for fundamental instance type
When checking whether an instance is of a given fundamental type (such
as G_TYPE_OBJECT), we can avoid over 60%+ of the cost of checking types.

https://bugzilla.gnome.org/show_bug.cgi?id=730984
2014-05-31 15:45:29 +02:00
Matthias Clasen
03a48e1ade Fix the closure test in continuous
This test has the same problem as the mapping-test - it uses
SIGUSR1 without checking the signal mask. Apply the same fix
here.
2014-05-30 10:22:35 -04:00
Marek Kasik
6a8c2685be gobject: unref unused class
If g_type_class_ref() returns a class which is not
a GObjectClass we need to unref it before return in
object_interface_check_properties().

https://bugzilla.gnome.org/show_bug.cgi?id=706983
2014-05-22 11:00:14 +02:00
Matthias Clasen
4360756c69 Avoid overeager warning about deprecated properties
Construct properties are always set during construction.
It makes no sense to warn about this even if the property
is marked as deprecated; the deprecation warning should
only be issues for explicit uses of the property after
construction.

https://bugzilla.gnome.org/show_bug.cgi?id=730045
2014-05-13 08:08:38 -04:00
Matthias Clasen
4dba2eb486 Remove some markup from docs 2014-05-13 08:08:37 -04:00
Tom Tromey
20cda557e5 gobject.py: Port to gdb 7.7 frame filter API
https://bugzilla.gnome.org/show_bug.cgi?id=623552
2014-05-10 19:49:22 +10:00
Sébastien Wilmet
430e6fd6ad doc: various improvements
- GSubprocessLauncher exists since 2.40, not 2.36
- more logical order for g_markup functions
- fix short description of GMarkup
- GMarkupParser: specify that some parameters are NULL-terminated.
- g_string_new (NULL); is possible.
- other trivial fixes.

https://bugzilla.gnome.org/show_bug.cgi?id=728983
2014-05-09 18:47:42 +02:00
Mathieu Bridon
24fdee7a78 Fix some typos in documentation 2014-05-05 18:30:56 +08:00
Philip Withnall
704852ff09 gobject: Document that classes/objects/interfaces are zero-filled
On initialisation, GObject guarantees to zero-fill
class/object/interface structures. Document this so people don’t spend
forever writing:
    my_object->priv->some_member = NULL;
    my_object->priv->some_other_member = NULL;

https://bugzilla.gnome.org/show_bug.cgi?id=729167
2014-04-29 10:40:20 +01:00
Volker Sobek
4441595378 docs: Remove <!-- --> comment before plural s
These did show up in the html. Since symbol names are checked for a
trailing plural s when generating the docs, the links stay functional
after removing these comments.

https://bugzilla.gnome.org/show_bug.cgi?id=728380
2014-04-24 13:42:37 +02:00
Volker Sobek
9f0ad54c80 docs: Use markdown links in all .c and .h files
Commit e7fd3de86d already did most of this.

https://bugzilla.gnome.org/show_bug.cgi?id=728285
2014-04-15 22:19:07 +02:00
Emmanuele Bassi
6c395244a5 gparam: Add G_PARAM_READWRITE to GParamFlags
Using a #define for an enumeration value buys us nothing, and it's
mostly historical baggage that makes binding GObject needlessly
complicated.

https://bugzilla.gnome.org/show_bug.cgi?id=726037
2014-04-10 20:00:23 +01:00
Alexandre Rostovtsev
2b178c762f gobject: try to link with -Wl,-z,nodelete
Since the type system does not support reloading its data and assumes
that libgobject remains loaded for the lifetime of the process, we
should link libgobject with a flag indicating that it can't be unloaded.

https://bugzilla.gnome.org/show_bug.cgi?id=707298
2014-04-10 01:38:41 -04:00
Paolo Borelli
4a4b044321 Add a small note to g_cclosure_marshal_generic docs
reviewed-by: Emmanuele Bassi
2014-04-03 11:37:32 +02:00
Dan Winship
d8c14f1378 gbinding: warn on failed value transformation
GBinding warned if g_value_transform() returned FALSE, but it didn't
warn if there was no transformation available at all. Fix that and
test it.

https://bugzilla.gnome.org/show_bug.cgi?id=726574
2014-03-17 17:43:19 -04:00
Sebastian Dröge
012011538f gtype – Mark _get_instance_private() function as G_GNUC_UNUSED
clang likes to complain about it being unused.

https://bugzilla.gnome.org/show_bug.cgi?id=723899
2014-03-08 09:01:52 -05:00
Matthias Clasen
7a6dfd75d6 GObject: Remove more leftover markup from headers 2014-03-07 06:10:36 -05:00
Matthias Clasen
49cc207e35 docs: Ditch more markup
Some markup was hiding in docs in headers. Drop it there, too.
2014-03-02 18:23:43 -05:00
William Jon McCann
20f4d1820b docs: use "Returns:" consistently
Instead of "Return value:".
2014-02-19 19:41:52 -05:00
Ryan Lortie
7cbff954b9 win32: fixup lib.exe invocation
We have a configure.ac check for lib.exe that attempts to enable
creation of .lib files for our 5 public libraries.  That has been broken
for a long time for two reasons:

 1) the Makefiles hardcode 'lib' instead of 'lib.exe'

 2) we dropped generation of .def files quite some time ago (except for
    in gthread where we have the two-symbol file under version control)

Add new rules for creating .def files from dumpbin.exe (which you should
have if you have lib.exe) and fix the .lib rules to use lib.exe.

Add a bit of $(AM_V_GEN) all around, as well.

https://bugzilla.gnome.org/show_bug.cgi?id=722033
2014-02-15 16:55:25 -05:00
Dan Winship
5cab3fcec1 gobject: re-allow finalization from constructor()
Although returning NULL from constructor is strongly discouraged, some
old libraries need to keep doing it for ABI-compatibility reasons.
Given this, it's rude to forbid finalization from within
constructor(), since it would otherwise work correctly now anyway (and
the critical when returning NULL should discourage any new uses of
returning NULL from constructor()).

https://bugzilla.gnome.org/show_bug.cgi?id=661576
2014-02-15 10:20:53 -05:00
Matthias Clasen
bc6ee788b4 docs: let go of &ast;
Since we are no longer using sgml mode, using /&ast; &ast;/ to
escape block comments inside examples does not work anymore.
Switch to using line comments with //
2014-02-14 21:33:36 -05:00
Matthias Clasen
35066ed6c6 Docs: Drop entities, switch away from sgml mode
Since all element markup is now gone from the doc comments,
we can turn off the gtk-doc sgml mode, which means that from
now on, docbook markup is no longer allowed in doc comments.

To make this possible, we have to replace all remaining
entities in doc comments by their replacement text, &amp; -> &
and so on.
2014-02-09 02:07:26 -05:00
Matthias Clasen
e7fd3de86d Eradicate links and xrefs
These are all replaced by markdown ref links.
2014-02-08 12:26:56 -05:00
Matthias Clasen
5baa0f2af5 Stop using <para> for ids
Instead, use the id support in markdown headings.
2014-02-06 16:48:49 -05:00
Matthias Clasen
3232425785 Docs: replace <literal> by ` 2014-02-06 08:07:16 -05:00
Matthias Clasen
a35d8a4c77 Docs: use quotes instead of firstterm 2014-02-06 08:07:16 -05:00
Matthias Clasen
cb588d4532 Convert external links to markdown syntax 2014-02-05 21:23:28 -05:00
Ryan Lortie
78ec35f7ab gobject: box GVariantDict
We will want to use this in GApplication for a signal and a property.

https://bugzilla.gnome.org/show_bug.cgi?id=625408
2014-02-04 12:24:19 +00:00
Matthias Clasen
adf892e96a Annotate all examples with their language
The C ones, at least.
2014-02-01 15:11:49 -05:00
Matthias Clasen
42cf80780b Docs: Big entity cleanup
Strip lots of entity use from |[ ]| examples (which are now
implicit CDATA). Also remove many redundant uses of <!-- -->.
2014-02-01 12:00:30 -05:00
Matthias Clasen
60b623d3fb GObject: Convert docs to markdown
In particular, convert lists to markdown syntax.
2014-02-01 10:22:45 -05:00
Matthias Clasen
a4c33c6f8b Docs: Don't use the code tag 2014-01-31 22:05:04 -05:00
Matthias Clasen
17f51583a8 Docs: Convert examples to |[ ]| 2014-01-31 21:56:33 -05:00
Matthias Clasen
4d12e0d66f Docs: Don't use the emphasis tag
Most of the time, the text read just as well without the extra
boldness.
2014-01-31 20:34:33 -05:00
Matthias Clasen
c575d24dfb Docs: Don't use the note tag
More markup avoidance.
2014-01-31 18:20:06 -05:00
Daniel Mustieles
078dbda148 Updated FSF's address 2014-01-31 14:31:55 +01:00
Matthias Clasen
3d42934b71 Docs: don't use the structname tag
Just avoid explicit docbook markup.
2014-01-31 00:29:14 -05:00
Matthias Clasen
6f3c465535 Docs: don't use structfield tags
They don't add anything over @foo, and we want to avoid explicit
docbook markup as far as possible.
2014-01-30 23:59:06 -05:00