From 8ad17ad06612ee08a69572186858be074b0c5c99 Mon Sep 17 00:00:00 2001 From: "sgunderson@bigfoot.com" <> Date: Fri, 23 Sep 2011 01:29:54 +0200 Subject: [PATCH] Support includes in php5-swig. --- php5-swig/xml-template.swig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/php5-swig/xml-template.swig b/php5-swig/xml-template.swig index 2feceba..a2dd2d1 100644 --- a/php5-swig/xml-template.swig +++ b/php5-swig/xml-template.swig @@ -58,6 +58,13 @@ Directive* convert_php_objects_to_directive(zval *obj) char *str = Z_STRVAL_P(obj); return new Replace(str); } + case IS_RESOURCE: { + xmlDocPtr *doc; + if (SWIG_ConvertPtr(obj, (void **)&doc, SWIGTYPE_p_xmlDocPtr, 0) < 0 || doc == NULL) { + return NULL; + } + return new ReplaceInclude(xmlCopyDoc(*doc, 1)); + } case IS_NULL: return NULL; default: -- 2.39.2