[gtk-doc] mkdb: be more flexible on making () links.
- From: Stefan Kost <stefkost src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkdb: be more flexible on making () links.
- Date: Thu, 26 Nov 2009 08:50:52 +0000 (UTC)
commit 8a77cc455ae6d5fbafdc4984c83d4f379407766f
Author: Stefan Kost <ensonic users sf net>
Date: Thu Nov 26 10:44:24 2009 +0200
mkdb: be more flexible on making () links.
We now don't create broken links for e.g. gtk_*_new() and we allow to link to
class methods like in #GObjectClass.dispose().
gtkdoc-mkdb.in | 6 +++++-
tests/gobject/src/gobject.c | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 44b0f72..37112ed 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -2416,7 +2416,11 @@ sub ExpandAbbreviationsCallback {
# any gtk-doc abbreviations.
# Convert 'function()' or 'macro()'.
- $text =~ s/(\w+)\s*\(\)/&MakeXRef($1, &tagify($1 . "()", "function"));/eg;
+ # if there is abc_*_def() we don't want to make a link to _def()
+ # FIXME: also handle abc(....) : but that would need to be done recursively :/
+ $text =~ s/([^\*.\w])(\w+)\s*\(\)/$1.&MakeXRef($2, &tagify($2 . "()", "function"));/eg;
+ # handle #Object.func()
+ $text =~ s/(\A|[^\\])#([\w\-:\.]+[\w]+)\s*\(\)/$1.&MakeXRef($2, &tagify($2 . "()", "function"));/eg;
# Convert '@param', but not '\ param'.
$text =~ s/(\A|[^\\])\@(\w+((\.|->)\w+)*)/$1<parameter>$2<\/parameter>/g;
diff --git a/tests/gobject/src/gobject.c b/tests/gobject/src/gobject.c
index 2df0df2..65b721f 100644
--- a/tests/gobject/src/gobject.c
+++ b/tests/gobject/src/gobject.c
@@ -7,7 +7,7 @@
* We can link to the #GtkdocObject:otest property and the #GtkdocObject::otest
* signal.
*
- * When subclassing it is useful to override the #GtkdocObjectClass.test
+ * When subclassing it is useful to override the #GtkdocObjectClass.test()
* method.
*
* A new instance can be created using the gtkdoc_object_new() function. The
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]