summaryrefslogtreecommitdiff
path: root/test/DOMTSHandler.pm
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-07-07 15:31:40 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-07-07 15:57:17 +0100
commit73cbed2db0bb587f2c544cdf92dbf56eb7a79971 (patch)
tree57bb6b019ddafa022ff2cb12d34110448b11cbd7 /test/DOMTSHandler.pm
parent96f36b38bdfb3008d5cd6e94da6ad13faf93fd97 (diff)
downloadlibdom-73cbed2db0bb587f2c544cdf92dbf56eb7a79971.tar.gz
libdom-73cbed2db0bb587f2c544cdf92dbf56eb7a79971.tar.bz2
HTMLTitleElement: Implementation and enabling of test
Diffstat (limited to 'test/DOMTSHandler.pm')
-rw-r--r--test/DOMTSHandler.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/DOMTSHandler.pm b/test/DOMTSHandler.pm
index dd5a7a8..37f6166 100644
--- a/test/DOMTSHandler.pm
+++ b/test/DOMTSHandler.pm
@@ -788,7 +788,7 @@ sub generate_attribute_fetcher {
}
my $fetcher = to_attribute_fetcher($ats{'interface'}, "$en");
-
+ my $cast = to_attribute_cast($ats{'interface'});
my $unref = 0;
my $temp_node = 0;
# Deal with the situation like
@@ -807,14 +807,14 @@ sub generate_attribute_fetcher {
my $t = type_to_ctype($self->{'var'}->{$ats{'var'}});
$tnode_index ++;
print "\t$t tnode$tnode_index = NULL;\n";
- print "\texp = $fetcher($ats{'obj'}, \&tnode$tnode_index);\n";
+ print "\texp = $fetcher(${cast}$ats{'obj'}, \&tnode$tnode_index);\n";
# The ats{'obj'} must have been added to cleanup stack
$unref = 1;
# Indicate that we have created a temp node
$temp_node = 1;
} else {
$unref = $self->param_unref($ats{'var'});
- print "\texp = $fetcher($ats{'obj'}, \&$ats{'var'});\n";
+ print "\texp = $fetcher(${cast}$ats{'obj'}, \&$ats{'var'});\n";
}
@@ -1379,6 +1379,13 @@ sub to_attribute_accessor {
return $ret;
}
+sub to_attribute_cast {
+ my $type = shift;
+ my $ret = get_prefix($type);
+ $ret =~ s/h_t_m_l/html/;
+ return "(${ret} *)";
+}
+
sub get_prefix {
my $type = shift;