From e0e50631732a9cd7c5a110b10bee258219d833f5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 4 Sep 2016 12:43:29 +0200 Subject: [PATCH] Drop some pieces of commented-out code --- Zend/zend_interfaces.c | 19 ------------------- Zend/zend_operators.h | 4 ---- ext/pgsql/pgsql.c | 14 -------------- ext/spl/php_spl.h | 6 ------ ext/standard/array.c | 6 ------ ext/standard/dir.c | 9 --------- ext/standard/strnatcmp.c | 10 ---------- 7 files changed, 68 deletions(-) diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 2dadb39b17..db53a266fb 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -191,16 +191,6 @@ ZEND_API zval *zend_user_it_get_current_data(zend_object_iterator *_iter) } /* }}} */ -/* {{{ zend_user_it_get_current_key_default */ -#if 0 -static int zend_user_it_get_current_key_default(zend_object_iterator *_iter, char **str_key, uint *str_key_len, ulong *int_key) -{ - *int_key = _iter->index; - return HASH_KEY_IS_LONG; -} -#endif -/* }}} */ - /* {{{ zend_user_it_get_current_key */ ZEND_API void zend_user_it_get_current_key(zend_object_iterator *_iter, zval *key) { @@ -394,15 +384,6 @@ static int zend_implement_iterator(zend_class_entry *interface, zend_class_entry /* {{{ zend_implement_arrayaccess */ static int zend_implement_arrayaccess(zend_class_entry *interface, zend_class_entry *class_type) { -#if 0 - /* get ht from ce */ - if (ht->read_dimension != zend_std_read_dimension - || ht->write_dimension != zend_std_write_dimension - || ht->has_dimension != zend_std_has_dimension - || ht->unset_dimension != zend_std_unset_dimension) { - return FAILURE; - } -#endif return SUCCESS; } /* }}}*/ diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 068266ebd6..ca772c0de0 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -39,10 +39,6 @@ #include "zend_strtod.h" #include "zend_multiply.h" -#if 0&&HAVE_BCMATH -#include "ext/bcmath/libbcmath/src/bcmath.h" -#endif - #define LONG_SIGN_MASK (((zend_long)1) << (8*sizeof(zend_long)-1)) BEGIN_EXTERN_C() diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 1aa3855af0..32f583bd76 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1510,20 +1510,6 @@ err: } /* }}} */ -#if 0 -/* {{{ php_pgsql_get_default_link - */ -static int php_pgsql_get_default_link(INTERNAL_FUNCTION_PARAMETERS) -{ - if (PGG(default_link)==-1) { /* no link opened yet, implicitly open one */ - ht = 0; - php_pgsql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0); - } - return PGG(default_link); -} -/* }}} */ -#endif - /* {{{ proto resource pg_connect(string connection_string[, int connect_type] | [string host, string port [, string options [, string tty,]]] string database) Open a PostgreSQL connection */ PHP_FUNCTION(pg_connect) diff --git a/ext/spl/php_spl.h b/ext/spl/php_spl.h index b936cfe45b..890945c687 100644 --- a/ext/spl/php_spl.h +++ b/ext/spl/php_spl.h @@ -24,12 +24,6 @@ #define PHP_SPL_VERSION PHP_VERSION -#if 0 -#define SPL_DEBUG(x) x -#else -#define SPL_DEBUG(x) -#endif - extern zend_module_entry spl_module_entry; #define phpext_spl_ptr &spl_module_entry diff --git a/ext/standard/array.c b/ext/standard/array.c index af9734d3d7..1225852be0 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -1841,12 +1841,6 @@ PHP_FUNCTION(extract) } symbol_table = zend_rebuild_symbol_table(); -#if 0 - if (!symbol_table) { - php_error_docref(NULL, E_WARNING, "failed to build symbol table"); - return; - } -#endif /* The array might be stored in a local variable that will be overwritten. To avoid losing the * reference in that case we work on a copy. */ diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 222c993c65..de7e01ffea 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -63,15 +63,6 @@ int dir_globals_id; php_dir_globals dir_globals; #endif -#if 0 -typedef struct { - int id; - DIR *dir; -} php_dir; - -static int le_dirp; -#endif - static zend_class_entry *dir_class_entry_ptr; #define FETCH_DIRP() \ diff --git a/ext/standard/strnatcmp.c b/ext/standard/strnatcmp.c index a272be8a29..ac8d2a2e91 100644 --- a/ext/standard/strnatcmp.c +++ b/ext/standard/strnatcmp.c @@ -30,16 +30,6 @@ #include "php.h" #include "php_string.h" -#if defined(__GNUC__) -# define UNUSED __attribute__((__unused__)) -#else -# define UNUSED -#endif - -#if 0 -static char const *version UNUSED = - "$Id$"; -#endif /* {{{ compare_right */ static int -- 2.40.0