mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Eliminate usages of _PP macros
These are either in debug code (fix them), commented out (drop them) or in dead compatibility macros (drop them). One usage was in php_stream_get_from_zval(), which we have not used since at least PHP 5.2 and, judging from the fact that nobody complained about it causing compile errors in PHP 7, nobody else uses it either, so drop it. There are still remaining uses in mysqli embedded and odbc birdstep. These probably need to be dropped outright.
This commit is contained in:
parent
3240dd93b3
commit
5602f64213
9 changed files with 20 additions and 58 deletions
|
@ -129,8 +129,6 @@ typedef struct dba_handler {
|
|||
DBA_SYNC_FUNC(x); \
|
||||
DBA_INFO_FUNC(x)
|
||||
|
||||
#define VALLEN(p) Z_STRVAL_PP(p), Z_STRLEN_PP(p)
|
||||
|
||||
PHP_FUNCTION(dba_open);
|
||||
PHP_FUNCTION(dba_popen);
|
||||
PHP_FUNCTION(dba_close);
|
||||
|
|
|
@ -4074,7 +4074,7 @@ PHP_FUNCTION(exif_read_data)
|
|||
exif_discard_imageinfo(&ImageInfo);
|
||||
|
||||
#ifdef EXIF_DEBUG
|
||||
php_error_docref1(NULL, Z_STRVAL_PP(p_name), E_NOTICE, "done");
|
||||
php_error_docref1(NULL, p_name, E_NOTICE, "done");
|
||||
#endif
|
||||
}
|
||||
/* }}} */
|
||||
|
|
|
@ -23,24 +23,10 @@
|
|||
#ifndef MYSQLND_PRIV_H
|
||||
#define MYSQLND_PRIV_H
|
||||
|
||||
#ifndef Z_ADDREF_P
|
||||
/* PHP 5.2, old GC */
|
||||
#define Z_ADDREF_P(pz) (++(pz)->refcount)
|
||||
#define Z_DELREF_P(pz) (--(pz)->refcount)
|
||||
#define Z_REFCOUNT_P(pz) ((pz)->refcount)
|
||||
#define Z_SET_REFCOUNT_P(pz, rc) ((pz)->refcount = rc)
|
||||
#define Z_REFCOUNT_PP(ppz) Z_REFCOUNT_P(*(ppz))
|
||||
#define Z_DELREF_PP(ppz) Z_DELREF_P(*(ppz))
|
||||
#endif
|
||||
|
||||
#ifdef ZTS
|
||||
#include "TSRM.h"
|
||||
#endif
|
||||
|
||||
#ifndef pestrndup
|
||||
#define pestrndup(s, length, persistent) ((persistent)?zend_strndup((s),(length)):estrndup((s),(length)))
|
||||
#endif
|
||||
|
||||
#define MYSQLND_STR_W_LEN(str) str, (sizeof(str) - 1)
|
||||
|
||||
#define MYSQLND_DEBUG_DUMP_TIME 1
|
||||
|
|
|
@ -305,7 +305,7 @@ PHP_FUNCTION(readline_info)
|
|||
oldval = rl_erase_empty_line;
|
||||
if (value) {
|
||||
convert_to_long_ex(value);
|
||||
rl_erase_empty_line = Z_LVAL_PP(value);
|
||||
rl_erase_empty_line = Z_LVAL_P(value);
|
||||
}
|
||||
RETVAL_LONG(oldval);
|
||||
#endif
|
||||
|
|
|
@ -700,16 +700,6 @@ try_again:
|
|||
PHP_MD5Update(&md5ctx, (unsigned char*)phpurl->query, strlen(phpurl->query));
|
||||
}
|
||||
|
||||
/* TODO: Support for qop="auth-int" */
|
||||
/*
|
||||
if (zend_hash_find(Z_ARRVAL_PP(digest), "qop", sizeof("qop"), (void **)&tmp) == SUCCESS &&
|
||||
Z_TYPE_PP(tmp) == IS_STRING &&
|
||||
Z_STRLEN_PP(tmp) == sizeof("auth-int")-1 &&
|
||||
stricmp(Z_STRVAL_PP(tmp), "auth-int") == 0) {
|
||||
PHP_MD5Update(&md5ctx, ":", 1);
|
||||
PHP_MD5Update(&md5ctx, HEntity, HASHHEXLEN);
|
||||
}
|
||||
*/
|
||||
PHP_MD5Final(hash, &md5ctx);
|
||||
make_digest(HA2, hash);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Generated by re2c 0.13.7.5 */
|
||||
/* Generated by re2c 0.13.5 */
|
||||
#line 1 "ext/standard/var_unserializer.re"
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
|
@ -44,7 +44,7 @@ static inline void var_push(php_unserialize_data_t *var_hashx, zval *rval)
|
|||
{
|
||||
var_entries *var_hash = (*var_hashx)->last;
|
||||
#if VAR_ENTRIES_DBG
|
||||
fprintf(stderr, "var_push(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval));
|
||||
fprintf(stderr, "var_push(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_P(rval));
|
||||
#endif
|
||||
|
||||
if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) {
|
||||
|
@ -104,7 +104,7 @@ PHPAPI void var_replace(php_unserialize_data_t *var_hashx, zval *ozval, zval *nz
|
|||
zend_long i;
|
||||
var_entries *var_hash = (*var_hashx)->first;
|
||||
#if VAR_ENTRIES_DBG
|
||||
fprintf(stderr, "var_replace(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(nzval));
|
||||
fprintf(stderr, "var_replace(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_P(nzval));
|
||||
#endif
|
||||
|
||||
while (var_hash) {
|
||||
|
@ -651,8 +651,7 @@ yy20:
|
|||
if (yybm[0+yych] & 128) {
|
||||
goto yy20;
|
||||
}
|
||||
if (yych <= '/') goto yy18;
|
||||
if (yych >= ';') goto yy18;
|
||||
if (yych != ':') goto yy18;
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != '"') goto yy18;
|
||||
++YYCURSOR;
|
||||
|
@ -801,7 +800,7 @@ yy20:
|
|||
|
||||
return object_common2(UNSERIALIZE_PASSTHRU, elements);
|
||||
}
|
||||
#line 805 "ext/standard/var_unserializer.c"
|
||||
#line 804 "ext/standard/var_unserializer.c"
|
||||
yy25:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= ',') {
|
||||
|
@ -833,7 +832,7 @@ yy27:
|
|||
return object_common2(UNSERIALIZE_PASSTHRU,
|
||||
object_common1(UNSERIALIZE_PASSTHRU, ZEND_STANDARD_CLASS_DEF_PTR));
|
||||
}
|
||||
#line 837 "ext/standard/var_unserializer.c"
|
||||
#line 836 "ext/standard/var_unserializer.c"
|
||||
yy32:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych == '+') goto yy33;
|
||||
|
@ -878,7 +877,7 @@ yy34:
|
|||
|
||||
return finish_nested_data(UNSERIALIZE_PASSTHRU);
|
||||
}
|
||||
#line 882 "ext/standard/var_unserializer.c"
|
||||
#line 881 "ext/standard/var_unserializer.c"
|
||||
yy39:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych == '+') goto yy40;
|
||||
|
@ -927,7 +926,7 @@ yy41:
|
|||
ZVAL_STR(rval, str);
|
||||
return 1;
|
||||
}
|
||||
#line 931 "ext/standard/var_unserializer.c"
|
||||
#line 930 "ext/standard/var_unserializer.c"
|
||||
yy46:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych == '+') goto yy47;
|
||||
|
@ -975,7 +974,7 @@ yy48:
|
|||
ZVAL_STRINGL(rval, str, len);
|
||||
return 1;
|
||||
}
|
||||
#line 979 "ext/standard/var_unserializer.c"
|
||||
#line 978 "ext/standard/var_unserializer.c"
|
||||
yy53:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') {
|
||||
|
@ -1072,7 +1071,7 @@ use_double:
|
|||
ZVAL_DOUBLE(rval, zend_strtod((const char *)start + 2, NULL));
|
||||
return 1;
|
||||
}
|
||||
#line 1076 "ext/standard/var_unserializer.c"
|
||||
#line 1075 "ext/standard/var_unserializer.c"
|
||||
yy65:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= ',') {
|
||||
|
@ -1147,7 +1146,7 @@ yy73:
|
|||
|
||||
return 1;
|
||||
}
|
||||
#line 1151 "ext/standard/var_unserializer.c"
|
||||
#line 1150 "ext/standard/var_unserializer.c"
|
||||
yy76:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych == 'N') goto yy73;
|
||||
|
@ -1200,7 +1199,7 @@ yy79:
|
|||
ZVAL_LONG(rval, parse_iv(start + 2));
|
||||
return 1;
|
||||
}
|
||||
#line 1204 "ext/standard/var_unserializer.c"
|
||||
#line 1203 "ext/standard/var_unserializer.c"
|
||||
yy83:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy18;
|
||||
|
@ -1214,7 +1213,7 @@ yy83:
|
|||
ZVAL_BOOL(rval, parse_iv(start + 2));
|
||||
return 1;
|
||||
}
|
||||
#line 1218 "ext/standard/var_unserializer.c"
|
||||
#line 1217 "ext/standard/var_unserializer.c"
|
||||
yy87:
|
||||
++YYCURSOR;
|
||||
#line 573 "ext/standard/var_unserializer.re"
|
||||
|
@ -1223,7 +1222,7 @@ yy87:
|
|||
ZVAL_NULL(rval);
|
||||
return 1;
|
||||
}
|
||||
#line 1227 "ext/standard/var_unserializer.c"
|
||||
#line 1226 "ext/standard/var_unserializer.c"
|
||||
yy89:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= ',') {
|
||||
|
@ -1271,7 +1270,7 @@ yy91:
|
|||
|
||||
return 1;
|
||||
}
|
||||
#line 1275 "ext/standard/var_unserializer.c"
|
||||
#line 1274 "ext/standard/var_unserializer.c"
|
||||
yy95:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= ',') {
|
||||
|
@ -1320,7 +1319,7 @@ yy97:
|
|||
|
||||
return 1;
|
||||
}
|
||||
#line 1324 "ext/standard/var_unserializer.c"
|
||||
#line 1323 "ext/standard/var_unserializer.c"
|
||||
}
|
||||
#line 875 "ext/standard/var_unserializer.re"
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ static inline void var_push(php_unserialize_data_t *var_hashx, zval *rval)
|
|||
{
|
||||
var_entries *var_hash = (*var_hashx)->last;
|
||||
#if VAR_ENTRIES_DBG
|
||||
fprintf(stderr, "var_push(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval));
|
||||
fprintf(stderr, "var_push(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_P(rval));
|
||||
#endif
|
||||
|
||||
if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) {
|
||||
|
@ -102,7 +102,7 @@ PHPAPI void var_replace(php_unserialize_data_t *var_hashx, zval *ozval, zval *nz
|
|||
zend_long i;
|
||||
var_entries *var_hash = (*var_hashx)->first;
|
||||
#if VAR_ENTRIES_DBG
|
||||
fprintf(stderr, "var_replace(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(nzval));
|
||||
fprintf(stderr, "var_replace(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_P(nzval));
|
||||
#endif
|
||||
|
||||
while (var_hash) {
|
||||
|
|
|
@ -568,12 +568,6 @@ PHPAPI const char *php_stream_locate_eol(php_stream *stream, zend_string *buf);
|
|||
#define php_stream_open_wrapper(path, mode, options, opened) _php_stream_open_wrapper_ex((path), (mode), (options), (opened), NULL STREAMS_CC)
|
||||
#define php_stream_open_wrapper_ex(path, mode, options, opened, context) _php_stream_open_wrapper_ex((path), (mode), (options), (opened), (context) STREAMS_CC)
|
||||
|
||||
#define php_stream_get_from_zval(stream, zstream, mode, options, opened, context) \
|
||||
if (Z_TYPE_PP((zstream)) == IS_RESOURCE) { \
|
||||
php_stream_from_zval((stream), (zstream)); \
|
||||
} else (stream) = Z_TYPE_PP((zstream)) == IS_STRING ? \
|
||||
php_stream_open_wrapper_ex(Z_STRVAL_PP((zstream)), (mode), (options), (opened), (context)) : NULL
|
||||
|
||||
/* pushes an error message onto the stack for a wrapper instance */
|
||||
PHPAPI void php_stream_wrapper_log_error(php_stream_wrapper *wrapper, int options, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
|
||||
|
||||
|
|
|
@ -281,11 +281,6 @@ void phpdbg_webdata_decompress(char *msg, int len) {
|
|||
pefree(elm, zend_extensions.persistent);
|
||||
zend_extensions.count--;
|
||||
} else {
|
||||
/* zend_hash_get_current_key_zval_ex(Z_ARRVAL_PP(zvpp), &key, &hpos);
|
||||
if (Z_TYPE(key) == IS_LONG) {
|
||||
zend_hash_index_del(Z_ARRVAL_PP(zvpp), Z_LVAL(key));
|
||||
}
|
||||
*/
|
||||
zend_hash_del(Z_ARRVAL_P(zvp), strkey);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue