From 55b600d03c323daf02a54dff7d7159ee1ac8f843 Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Mon, 3 Sep 2001 21:54:27 +0000 Subject: [PATCH] fix compile on sun forte cc --- ext/sablot/sablot.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/ext/sablot/sablot.c b/ext/sablot/sablot.c index 228b52e298..f70ba9bb23 100644 --- a/ext/sablot/sablot.c +++ b/ext/sablot/sablot.c @@ -308,8 +308,12 @@ PHP_FUNCTION(xslt_output_endtransform) /* Nake sure there is data to send */ if (OG(active_ob_buffer).text_length) { - char *args[] = {"/_xmlinput", buffer, - "/_output", NULL}; + char *args[4]; + + args[0] = "/_xmlinput"; + args[1] = buffer; + args[2] = "/_output"; + args[3] = NULL; SABLOT_BASIC_CREATE_PROCESSOR(); @@ -491,6 +495,7 @@ PHP_FUNCTION(xslt_process) **input, **result, **base; + char *args[7]; char *tRes = NULL; int ret = 0, argc = ZEND_NUM_ARGS(); @@ -513,21 +518,17 @@ PHP_FUNCTION(xslt_process) SablotSetBase(SABLOT_BASIC_HANDLE, Z_STRVAL_PP(base)); } - /** - * Need to declare args here (to lazy to actually allocate - * it with emalloc() ;) - */ - { - char *args[] = {"/_stylesheet", Z_STRVAL_PP(xslt), - "/_xmlinput", Z_STRVAL_PP(input), - "/_output", NULL, - NULL}; - - ret = SablotRunProcessor(SABLOT_BASIC_HANDLE, "arg:/_stylesheet", - "arg:/_xmlinput", "arg:/_output", - NULL, args); - } + args[0] = "/_stylesheet"; + args[1] = Z_STRVAL_PP(xslt); + args[2] = "/_xmlinput"; + args[3] = Z_STRVAL_PP(input); + args[4] = "/_output"; + args[5] = NULL; + args[6] = NULL; + ret = SablotRunProcessor(SABLOT_BASIC_HANDLE, "arg:/_stylesheet", + "arg:/_xmlinput", "arg:/_output", + NULL, args); if (ret) { SABLOTG(last_errno) = ret; RETURN_FALSE; -- 2.50.1