Re: The new GTask name in GIO is wrong



On 12-11-02 06:11 PM, Matthew Brush wrote:
On 12-11-02 07:46 AM, Emmanuele Bassi wrote:
hi;

On 2 November 2012 14:15, Tal Hadad <tal_hd hotmail com> wrote:
First, there were an old project called GTask[0], which tried to give
parallelism ability and
alternative to today GIO async(I think it wasn't exist back than).

this is inconsequential: GTask was abusing the G* namespace, which is
reserved for GLib, GObject, and GIO. also, GTask has been
re-implemented/renamed to Iris[0].

Maybe the docs[3] could be updated

Patch attached. Apologies if I edited a generated file.

Cheers,
Matthew Brush

>From ffbf788a6abb7032b42bf9b9b45033ad5f6d7db9 Mon Sep 17 00:00:00 2001
From: Matthew Brush <mbrush codebrainz ca>
Date: Fri, 2 Nov 2012 21:36:50 -0700
Subject: [PATCH] Add note about using the reserved G_/g_ namespace prefixes

---
 docs/reference/gobject/tut_gtype.xml |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/docs/reference/gobject/tut_gtype.xml b/docs/reference/gobject/tut_gtype.xml
index c4ac673..c1ac0d1 100644
--- a/docs/reference/gobject/tut_gtype.xml
+++ b/docs/reference/gobject/tut_gtype.xml
@@ -286,6 +286,13 @@ struct _GTypeValueTable
             is used for static and dynamic type safety purposes (just like the previous casting
             macros).
           </para></listitem>
+          <listitem><para>Do not use the namespace prefixes "G_" or "g_" as they are
+            reserved for use by GLib, GIO and GObject. For example, if you're making a
+            GObject-based wrapper of the "Foo" object libary you should use a prefix like
+            "GFOO_" or "gfoo_", or better yet, drop the "g" altogether and use "FOO_" or "foo_"
+            as opposed to "G_FOO" or "g_foo" to avoid collisions with future official
+            GLib/GIO/GObject-based code.
+          </para></listitem>
         </itemizedlist>
         The implementation of these macros is pretty straightforward: a number of simple-to-use 
         macros are provided in <filename>gtype.h</filename>. For the example we used above, we would 
-- 
1.7.9.5



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]