]> granicus.if.org Git - php/commitdiff
Fix ZTS build.
authorSebastian Bergmann <sebastian@php.net>
Fri, 22 Aug 2008 08:17:02 +0000 (08:17 +0000)
committerSebastian Bergmann <sebastian@php.net>
Fri, 22 Aug 2008 08:17:02 +0000 (08:17 +0000)
ext/json/json.c

index 0e42dae6639bc3c61ed7704674b1677fbc24c4e3..40942a9b7cb471deebc700fd88521ac2d86f0496 100644 (file)
@@ -84,7 +84,7 @@ static PHP_MINFO_FUNCTION(json)
 /* }}} */
 
 static void json_encode_r(smart_str *buf, zval *val TSRMLS_DC);
-static void json_escape_string(smart_str *buf, char *s, int len);
+static void json_escape_string(smart_str *buf, char *s, int len TSRMLS_DC);
 
 static int json_determine_array_type(zval **val TSRMLS_DC)  /* {{{ */
 {
@@ -190,7 +190,7 @@ static void json_encode_array(smart_str *buf, zval **val TSRMLS_DC) { /* {{{ */
                             need_comma = 1;
                         }
 
-                        json_escape_string(buf, key, key_len - 1);
+                        json_escape_string(buf, key, key_len - 1 TSRMLS_CC);
                         smart_str_appendc(buf, ':');
 
                         json_encode_r(buf, *data TSRMLS_CC);
@@ -230,7 +230,7 @@ static void json_encode_array(smart_str *buf, zval **val TSRMLS_DC) { /* {{{ */
 
 #define REVERSE16(us) (((us & 0xf) << 12) | (((us >> 4) & 0xf) << 8) | (((us >> 8) & 0xf) << 4) | ((us >> 12) & 0xf))
 
-static void json_escape_string(smart_str *buf, char *s, int len) /* {{{ */
+static void json_escape_string(smart_str *buf, char *s, int len TSRMLS_DC) /* {{{ */
 {
     int pos = 0;
     unsigned short us;
@@ -375,7 +375,7 @@ static void json_encode_r(smart_str *buf, zval *val TSRMLS_DC) /* {{{ */
             }
             break;
         case IS_STRING:
-            json_escape_string(buf, Z_STRVAL_P(val), Z_STRLEN_P(val));
+            json_escape_string(buf, Z_STRVAL_P(val), Z_STRLEN_P(val) TSRMLS_CC);
             break;
         case IS_ARRAY:
         case IS_OBJECT: