diff options
author | Murray Cumming <murrayc@murrayc.com> | 2009-06-18 18:30:46 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2009-06-18 18:30:46 +0200 |
commit | 048e9c4c694d78c6c58ac60a46e693564a0af67a (patch) | |
tree | 9b42ccb8e222526c6b3869dafbe38fabf1f05c3d /tools | |
parent | 7db84ad093ed8885e4321f5768982c9215245132 (diff) | |
download | glibmm-048e9c4c694d78c6c58ac60a46e693564a0af67a.tar.gz |
Add debug output to hint that you *_docs.xmls needs a define-object.
* tools/pm/DocsParser.pm: lookup_object_of_method(),
* tools/pm/GtkDefs.pm: lookup_object(): Add debug output to hint that you
need a define-object for each C GType in the *_docs.xml file, though I
do not yet know why these are sometimes missing.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/pm/DocsParser.pm | 17 | ||||
-rw-r--r-- | tools/pm/GtkDefs.pm | 17 |
2 files changed, 30 insertions, 4 deletions
diff --git a/tools/pm/DocsParser.pm b/tools/pm/DocsParser.pm index ca4ef950..f56f30e5 100644 --- a/tools/pm/DocsParser.pm +++ b/tools/pm/DocsParser.pm @@ -440,9 +440,9 @@ sub substitute_function($$) } else { - print "Documentation: Translated $name into "; + print "Documentation: Transformed C name $name into "; non_object_method_name($doc_func, \$name); - print "$name\n"; + print "C++ name $name\n"; } } else @@ -481,6 +481,7 @@ sub non_object_method_name($$) } } } + print STDERR "Documentation: Class/Namespace for $$name not found\n"; } @@ -490,8 +491,18 @@ sub lookup_object_of_method($$) if($object ne "") { + my $result = GtkDefs::lookup_object($object); + # We already know the C object name, because $name is a non-static method. - return GtkDefs::lookup_object($object); + if(defined($result) and ($result ne "")) + { + return $result; + } + else + { + print "DocsParser.pm:lookup_object_of_method(): Warning: GtkDefs::lookup_object() failed for function name=" . $name . "\n"; + print " This may be a missing define-object in a *_docs.xml file." + } } my @parts = split(/_/, $name); diff --git a/tools/pm/GtkDefs.pm b/tools/pm/GtkDefs.pm index fbe1d1c2..7c791b89 100644 --- a/tools/pm/GtkDefs.pm +++ b/tools/pm/GtkDefs.pm @@ -298,7 +298,22 @@ sub lookup_enum($) sub lookup_object($) { no warnings; - return $GtkDefs::objects{$_[0]}; + + my $c_name = $_[0]; + my $result = $GtkDefs::objects{$c_name}; + + if (not defined($result)) + { + print "GtkDefs:lookup_object(): can't find object with name=" . $c_name . "\n"; + + # debug output: + # foreach my $key (keys %GtkDefs::objects) + # { + # print " possible name=" . $key . "\n"; + # } + } + + return $result; } # $objProperty lookup_property($name, $parent_object_name) |