[prev in list] [next in list] [prev in thread] [next in thread]
List: xerces-cvs
Subject: cvs commit: xml-xerces/perl postModule.pl
From: jasons () apache ! org
Date: 2001-03-27 1:46:37
[Download RAW message or body]
jasons 01/03/26 17:46:37
Modified: perl postModule.pl
Log:
* postModule.pl (Repository):
Fixed the heinous setErrorHandler() scoping bug.
Added a future fix for setEntityResolver() for when we get around
to implementing the perlEntityResolver Class
Revision Changes Path
1.6 +34 -0 xml-xerces/perl/postModule.pl
Index: postModule.pl
===================================================================
RCS file: /home/cvs/xml-xerces/perl/postModule.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- postModule.pl 2001/03/22 23:46:31 1.5
+++ postModule.pl 2001/03/27 01:46:37 1.6
@@ -132,6 +132,40 @@
EOT
}
+ # fix a scoping bug for seErrorHandler. If we don't maintain an
+ # internal reference to the error handler perl object it will
+ # get destroyed if it goes out of scope. Then if an error occurs
+ # perl will dump core
+ #
+ # look for: *setErrorHandler = *XML::Xercesc::DOMParser_setErrorHandler;
+ if (/DOMParser_setErrorHandler/) {
+ print TEMP <<'EOT';
+use vars qw($__HANDLER)
+sub setErrorHandler {
+ my @args = @_;
+ XML::Xercesc::DOMParser_setErrorHandler(@args);
+ # maintain an internal reference
+ $__HANDLER = $_[1];
+}
+EOT
+ # we don't print out the function
+ next;
+ }
+ # this same bug is likely to affect setEntityResolver() as well
+ # look for: *setEntityResolver = *XML::Xercesc::DOMParser_setEntityResolver;
+ if (/DOMParser_setEntityResolver/) {
+ print TEMP <<'EOT';
+use vars qw($__RESOLVER)
+sub setEntityResolver {
+ my @args = @_;
+ XML::Xercesc::DOMParser_setEntityResolver(@args);
+ # maintain an internal reference
+ $__RESOLVER = $_[1];
+}
+EOT
+ # we don't print out the function
+ next;
+ }
print TEMP;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic