summaryrefslogtreecommitdiff
path: root/test/DOMTSHandler.pm
diff options
context:
space:
mode:
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;