cvs: php4 /ext/sablot sablot.c

From: Date: Mon, 03 Sep 2001 21:54:27 +0000
Subject: cvs: php4 /ext/sablot sablot.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-7185@lists.php.net to get a copy of this message
sterling Mon Sep 3 17:54:27 2001 EDT Modified files: /php4/ext/sablot sablot.c Log: fix compile on sun forte cc Index: php4/ext/sablot/sablot.c diff -u php4/ext/sablot/sablot.c:1.53 php4/ext/sablot/sablot.c:1.54 --- php4/ext/sablot/sablot.c:1.53 Mon Aug 13 03:55:35 2001 +++ php4/ext/sablot/sablot.c Mon Sep 3 17:54:27 2001 @@ -308,8 +308,12 @@ /* 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 @@ **input, **result, **base; + char *args[7]; char *tRes = NULL; int ret = 0, argc = ZEND_NUM_ARGS(); @@ -513,21 +518,17 @@ 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;

« previous php.cvs (#7185) next »