[glibmm] gmmproc: Fix the annoying warnings about documentation.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] gmmproc: Fix the annoying warnings about documentation.
- Date: Fri, 3 Sep 2010 20:54:48 +0000 (UTC)
commit 1874b5025083dbc46111c6a0fcd36697ecda47ad
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Sep 3 22:54:39 2010 +0200
gmmproc: Fix the annoying warnings about documentation.
* tools/pm/GtkDefs.pm: lookup_object(): Do not print a warning when the
object is found, because this is used when guessing an object name while
breaking apart a function name in DocsParser.pm.
* gio/src/filelist.am:
* gio/src/gio.defs:
* gio/src/gio_extra_objects.defs:
* glib/src/filelist.am:
* glib/src/glib.defs:
* glib/src/glib_extra_objects.defs: Added the *extra_objects.defs files,
with hand-coded define-object sections, for objects that hide their *Class
or *Iface struct declarations, which stops h2defs.py from generating
define-object sections.
These allows DocsParser.pm to know how to split mentions of C functions into
the object and the method, so it can guess the C++ method name to mention
instead.
ChangeLog | 20 +++++++++
gio/src/filelist.am | 1 +
gio/src/gio.defs | 1 +
gio/src/gio_extra_objects.defs | 84 ++++++++++++++++++++++++++++++++++++++
glib/src/filelist.am | 1 +
glib/src/glib.defs | 2 +
glib/src/glib_extra_objects.defs | 50 ++++++++++++++++++++++
glib/src/glib_functions.defs | 12 -----
tools/pm/GtkDefs.pm | 6 ++-
9 files changed, 164 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 99e7e78..7d7da58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
2010-09-03 Murray Cumming <murrayc murrayc com>
+ gmmproc: Fix the annoying warnings about documentation.
+
+ * tools/pm/GtkDefs.pm: lookup_object(): Do not print a warning when the
+ object is found, because this is used when guessing an object name while
+ breaking apart a function name in DocsParser.pm.
+ * gio/src/filelist.am:
+ * gio/src/gio.defs:
+ * gio/src/gio_extra_objects.defs:
+ * glib/src/filelist.am:
+ * glib/src/glib.defs:
+ * glib/src/glib_extra_objects.defs: Added the *extra_objects.defs files,
+ with hand-coded define-object sections, for objects that hide their *Class
+ or *Iface struct declarations, which stops h2defs.py from generating
+ define-object sections.
+ These allows DocsParser.pm to know how to split mentions of C functions into
+ the object and the method, so it can guess the C++ method name to mention
+ instead.
+
+2010-09-03 Murray Cumming <murrayc murrayc com>
+
giomm: Added remaining Proxy and ProxyResolver methods.
* gio/src/proxy.[hg|ccg]: Added connect_async().
diff --git a/gio/src/filelist.am b/gio/src/filelist.am
index c55ed26..39545da 100644
--- a/gio/src/filelist.am
+++ b/gio/src/filelist.am
@@ -4,6 +4,7 @@ giomm_files_defs = \
gio.defs \
gio_enums.defs \
gio_methods.defs \
+ gio_extra_objects.defs \
gio_unix_functions.defs \
gio_others.defs \
gio_signals.defs \
diff --git a/gio/src/gio.defs b/gio/src/gio.defs
index 8d30ed1..d262013 100644
--- a/gio/src/gio.defs
+++ b/gio/src/gio.defs
@@ -1,5 +1,6 @@
(include gio_methods.defs)
(include gio_unix_functions.defs)
+(include gio_extra_objects.defs)
(include gio_others.defs)
(include gio_enums.defs)
(include gio_signals.defs)
diff --git a/gio/src/gio_extra_objects.defs b/gio/src/gio_extra_objects.defs
new file mode 100644
index 0000000..b60825b
--- /dev/null
+++ b/gio/src/gio_extra_objects.defs
@@ -0,0 +1,84 @@
+; These define-object declarations were not generated by h2defs.py
+; because it looks for the SomethingClass declaration too, but that is often
+; hidden.
+; However, it is needed by the documentation generation, which needs to
+; know what objects exist, so it can guess how to break apart C function names
+; that are mentioned in documentation text.
+; (DocsParser.pm:substitute_function(), which uses GtkDefs.pm:lookup_object().)
+
+(define-object DBusConnection
+ (in-module "GLib")
+ (c-name "GDBusConnection")
+ (gtype-id "G_TYPE_DBUS_CONNECTION")
+)
+
+; This helps DocParser.pm, which can't always guess how to break the "DB" part.
+(define-object DbusConnection
+ (in-module "GLib")
+ (c-name "GDbusConnection")
+ (gtype-id "G_TYPE_DBUS_CONNECTION")
+)
+
+(define-object DBusMessage
+ (in-module "GLib")
+ (c-name "GDBusMessage")
+ (gtype-id "G_TYPE_DBUS_MESSAGE")
+)
+
+; This helps DocParser.pm, which can't always guess how to break the "DB" part.
+(define-object DbusMessage
+ (in-module "GLib")
+ (c-name "GDbusMessage")
+ (gtype-id "G_TYPE_DBUS_MESSAGE")
+)
+
+
+(define-object DBusMethodInvocation
+ (in-module "GLib")
+ (c-name "GDBusMethodInvocation")
+ (gtype-id "G_TYPE_DBUS_METHOD_INVOCATION")
+)
+
+(define-object DBusServer
+ (in-module "GLib")
+ (c-name "GDBusServer")
+ (gtype-id "G_TYPE_DBUS_SERVER")
+)
+
+; This helps DocParser.pm, which can't always guess how to break the "DB" part.
+(define-object DbusServer
+ (in-module "GLib")
+ (c-name "GDbusServer")
+ (gtype-id "G_TYPE_DBUS_SERVER")
+)
+
+(define-object DBusMethodInvocation
+ (in-module "GLib")
+ (c-name "GDBusMethodInvocation")
+ (gtype-id "G_TYPE_DBUS_METHOD_INVOCATION")
+)
+
+(define-object DesktopAppInfo
+ (in-module "GLib")
+ (c-name "GDesktopAppInfo")
+ (gtype-id "G_TYPE_DESKTOP_APP_INFO")
+)
+
+(define-object FileAttribute
+ (in-module "GLib")
+ (c-name "GFileAttribute")
+ (gtype-id "G_TYPE_FILE_ATTRIBUTE")
+)
+
+(define-object FileAttributeInfoList
+ (in-module "GLib")
+ (c-name "GFileAttributeInfoList")
+ (gtype-id "G_TYPE_FILE_ATTRIBUTE_INFO_LISt")
+)
+
+(define-object FileInfo
+ (in-module "GLib")
+ (c-name "GFileInfo")
+ (gtype-id "G_TYPE_FILE_INFO")
+)
+
diff --git a/glib/src/filelist.am b/glib/src/filelist.am
index d46ffff..d9dd26c 100644
--- a/glib/src/filelist.am
+++ b/glib/src/filelist.am
@@ -4,6 +4,7 @@ glibmm_files_defs = \
glib.defs \
glib_enums.defs \
glib_functions.defs \
+ glib_extra_objects.defs \
gmodule_enums.defs \
gmodule_functions.defs \
gobject.defs \
diff --git a/glib/src/glib.defs b/glib/src/glib.defs
index ce4f36d..e7e1297 100644
--- a/glib/src/glib.defs
+++ b/glib/src/glib.defs
@@ -1,5 +1,7 @@
(include glib_functions.defs)
(include glib_enums.defs)
+(include glib_extra_objects.defs)
(include gobject_functions.defs)
(include gmodule_functions.defs)
(include gmodule_enums.defs)
+
diff --git a/glib/src/glib_extra_objects.defs b/glib/src/glib_extra_objects.defs
new file mode 100644
index 0000000..a2176d4
--- /dev/null
+++ b/glib/src/glib_extra_objects.defs
@@ -0,0 +1,50 @@
+; These define-object declarations were not generated by h2defs.py
+; because it looks for the SomethingClass declaration too, but that is often
+; hidden.
+; However, it is needed by the documentation generation, which needs to
+; know what objects exist, so it can guess how to break apart C function names
+; that are mentioned in documentation text.
+; (DocsParser.pm:substitute_function(), which uses GtkDefs.pm:lookup_object().)
+
+(define-object OptionContext
+ (in-module "GLib")
+ (c-name "GOptionContext")
+ (gtype-id "G_TYPE_OPTION_CONTEXT")
+)
+
+(define-object Checksum
+ (in-module "GLib")
+ (c-name "GChecksum")
+ (gtype-id "G_TYPE_CHECKSUM")
+)
+
+(define-object KeyFile
+ (in-module "GLib")
+ (c-name "GKeyFile")
+ (gtype-id "G_TYPE_KEY_FILE")
+)
+
+
+(define-object Regex
+ (in-module "GLib")
+ (c-name "GRegex")
+ (gtype-id "G_TYPE_REGEX")
+)
+
+(define-object Set
+ (in-module "GLib")
+ (c-name "GSet")
+ (gtype-id "G_TYPE_SET")
+)
+
+(define-object Variant
+ (in-module "GLib")
+ (c-name "GVariant")
+ (gtype-id "G_TYPE_VARIANT")
+)
+
+(define-object VariantType
+ (in-module "GLib")
+ (c-name "GVariantType")
+ (gtype-id "G_TYPE_VARIANT_TYPE")
+)
diff --git a/glib/src/glib_functions.defs b/glib/src/glib_functions.defs
index 833c3e5..919a777 100644
--- a/glib/src/glib_functions.defs
+++ b/glib/src/glib_functions.defs
@@ -2300,18 +2300,6 @@
)
)
-(define-method
- (of-object "GIConv")
- (c-name "g_iconv")
- (return-type "gsize")
- (parameters
- '("gchar**" "inbuf")
- '("gsize*" "inbytes_left")
- '("gchar**" "outbuf")
- '("gsize*" "outbytes_left")
- )
-)
-
(define-method close
(of-object "GIConv")
(c-name "g_iconv_close")
diff --git a/tools/pm/GtkDefs.pm b/tools/pm/GtkDefs.pm
index b0002e2..694b423 100644
--- a/tools/pm/GtkDefs.pm
+++ b/tools/pm/GtkDefs.pm
@@ -407,7 +407,11 @@ sub lookup_object($)
if (not defined($result))
{
- print "GtkDefs:lookup_object(): can't find object with name=" . $c_name . "\n";
+ # We do not print this error because it's not always an error,
+ # because the caller will often try several object names,
+ # while guessing an object name prefix from a function name.
+ #
+ # print "GtkDefs:lookup_object(): can't find object with name=" . $c_name . "\n";
# debug output:
# foreach my $key (keys %GtkDefs::objects)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]