From: Remi Collet Date: Fri, 17 Oct 2014 08:27:05 +0000 (+0200) Subject: get rid of remaining HAVE_JSON, use PHP_PQ_HAVE_PHP_JSON_H everywhere X-Git-Tag: v0.5.3~9 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=commitdiff_plain;h=ab8bb315a8ff53835175250191facedf8119f6d3 get rid of remaining HAVE_JSON, use PHP_PQ_HAVE_PHP_JSON_H everywhere --- diff --git a/src/php_pq_params.c b/src/php_pq_params.c index 0cc370d..9554ef7 100644 --- a/src/php_pq_params.c +++ b/src/php_pq_params.c @@ -88,7 +88,7 @@ static zval *object_param_to_string(php_pq_params_t *p, zval *zobj, Oid type TSR smart_str str = {0}; switch (type) { -#if HAVE_JSON && defined(PHP_PQ_OID_JSON) +#if PHP_PQ_HAVE_PHP_JSON_H && defined(PHP_PQ_OID_JSON) # ifdef PHP_PQ_OID_JSONB case PHP_PQ_OID_JSONB: # endif @@ -227,7 +227,7 @@ static zval *array_param_to_string(php_pq_params_t *p, zval *zarr, Oid type TSRM struct apply_to_param_from_array_arg arg = {NULL}; switch (type) { -#if HAVE_JSON && defined(PHP_PQ_OID_JSON) +#if PHP_PQ_HAVE_PHP_JSON_H && defined(PHP_PQ_OID_JSON) # ifdef PHP_PQ_OID_JSONB case PHP_PQ_OID_JSONB: # endif diff --git a/src/php_pqres.c b/src/php_pqres.c index 2853275..ae8774d 100644 --- a/src/php_pqres.c +++ b/src/php_pqres.c @@ -176,7 +176,7 @@ zval *php_pqres_typed_zval(php_pqres_t *res, char *val, size_t len, Oid typ TSRM php_pqdt_from_string(val, len, "Y-m-d H:i:s.uO", zv TSRMLS_CC); break; -#if HAVE_JSON && defined(PHP_PQ_OID_JSON) +#if PHP_PQ_HAVE_PHP_JSON_H && defined(PHP_PQ_OID_JSON) # ifdef PHP_PQ_OID_JSONB case PHP_PQ_OID_JSONB: # endif @@ -1225,7 +1225,7 @@ PHP_MINIT_FUNCTION(pqres) zend_declare_class_constant_long(php_pqres_class_entry, ZEND_STRL("CONV_SCALAR"), PHP_PQRES_CONV_SCALAR TSRMLS_CC); zend_declare_class_constant_long(php_pqres_class_entry, ZEND_STRL("CONV_ARRAY"), PHP_PQRES_CONV_ARRAY TSRMLS_CC); zend_declare_class_constant_long(php_pqres_class_entry, ZEND_STRL("CONV_DATETIME"), PHP_PQRES_CONV_DATETIME TSRMLS_CC); -#if HAVE_JSON +#if PHP_PQ_HAVE_PHP_JSON_H zend_declare_class_constant_long(php_pqres_class_entry, ZEND_STRL("CONV_JSON"), PHP_PQRES_CONV_JSON TSRMLS_CC); #endif zend_declare_class_constant_long(php_pqres_class_entry, ZEND_STRL("CONV_ALL"), PHP_PQRES_CONV_ALL TSRMLS_CC);