openbsd-ports/lang/python/2.6/patches/patch-Modules_pyexpat_c
djm 413ba2dc4a port of Python-2.6, with 100% fewer build knobs!
Thanks to Ian Darwin, Will Maier and Aleksander Piotrowski for feedback
2008-10-18 12:03:56 +00:00

16 lines
597 B
Plaintext

$OpenBSD: patch-Modules_pyexpat_c,v 1.1 2008/10/18 12:03:56 djm Exp $
--- Modules/pyexpat.c.orig Tue Feb 19 14:21:13 2008
+++ Modules/pyexpat.c Tue Feb 19 14:21:18 2008
@@ -473,6 +473,11 @@ call_character_handler(xmlparseobject *self, const XML
noop_character_data_handler);
return -1;
}
+ if (!have_handler(self, CharacterData)) {
+ Py_DECREF(args);
+ flag_error(self);
+ return -1;
+ }
PyTuple_SET_ITEM(args, 0, temp);
/* temp is now a borrowed reference; consider it unused. */
self->in_callback = 1;