From: sgunderson@bigfoot.com <> Date: Thu, 22 Sep 2011 23:29:54 +0000 (+0200) Subject: Support includes in php5-swig. X-Git-Url: https://git.sesse.net/?p=xml-template;a=commitdiff_plain;h=8ad17ad06612ee08a69572186858be074b0c5c99 Support includes in php5-swig. --- 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: