summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2001-01-09 20:17:11 +0000
committerSterling Hughes <sterling@php.net>2001-01-09 20:17:11 +0000
commitf058a0791548c660860c80789e99886327f65b0f (patch)
treed27b2264f641f952eb191162f2709a52e6335c51
parentb0234843f89a01113fb0a7da55a5bb5e63909153 (diff)
downloadphp-git-f058a0791548c660860c80789e99886327f65b0f.tar.gz
Move the definition of the xslt_set_encoding to the "proper" place in the file and
fix the prototype.
-rw-r--r--ext/sablot/sablot.c56
1 files changed, 29 insertions, 27 deletions
diff --git a/ext/sablot/sablot.c b/ext/sablot/sablot.c
index 5e607b3827..ead9351ce3 100644
--- a/ext/sablot/sablot.c
+++ b/ext/sablot/sablot.c
@@ -837,6 +837,35 @@ PHP_FUNCTION(xslt_set_sax_handler)
}
/* }}} */
+
+#ifdef HAVE_SABLOT_SET_ENCODING
+
+/* {{{ proto void xslt_set_encoding(resource xh, string encoding)
+ Sets output encoding to be used for Sablotron regardless of the encoding specified by the stylesheet. To unset, call with encoding_ NULL. */
+PHP_FUNCTION(xslt_set_encoding)
+{
+ zval **xh, **encoding;
+ php_sablot *handle;
+ int ret = 0,
+ loglevel = 0,
+ argc = ZEND_NUM_ARGS();
+ SABLOTLS_FETCH();
+
+ if (argc != 2 ||
+ zend_get_parameters_ex(argc, &xh, &encoding) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ ZEND_FETCH_RESOURCE(handle, php_sablot *, xh, -1, "PHP-Sablotron", le_sablot);
+ convert_to_string_ex(encoding);
+
+ SablotSetEncoding(handle->p, (char *) Z_STRVAL_PP(encoding));
+
+}
+/* }}} */
+
+#endif
+
+
/* }}} */
/* {{{ Begin Error Handling functions */
@@ -979,33 +1008,6 @@ static void _php_sablot_handler_pair(php_sablot *handle, zval **first_func, zval
}
/* }}} */
-#ifdef HAVE_SABLOT_SET_ENCODING
-/* {{{ proto void xslt_set_encoding(resource xh, string encoding)
- Sets output encoding to be used for Sablotron regardless of the
- encoding specified by the stylesheet. To unset, call with
- encoding_ NULL. */
-PHP_FUNCTION(xslt_set_encoding)
-{
- zval **xh, **encoding;
- php_sablot *handle;
- int ret = 0,
- loglevel = 0,
- argc = ZEND_NUM_ARGS();
- SABLOTLS_FETCH();
-
- if (argc != 2 ||
- zend_get_parameters_ex(argc, &xh, &encoding) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
- ZEND_FETCH_RESOURCE(handle, php_sablot *, xh, -1, "PHP-Sablotron", le_sablot);
- convert_to_string_ex(encoding);
-
- SablotSetEncoding(handle->p, (char *)Z_STRVAL_PP(encoding));
-
-}
-/* }}} */
-#endif
-
/* {{{ _php_sablot_call_handler_function()
Call a sablot call handler function, wrapper for call_user_function() */
static void _php_sablot_call_handler_function(zval *handlerName, int argc, zval **args, char *function_name)