summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorHannes Magnusson <bjori@php.net>2006-06-26 16:33:39 +0000
committerHannes Magnusson <bjori@php.net>2006-06-26 16:33:39 +0000
commit223d122caeb65ab2f495891b604883b7db1b7032 (patch)
treed938ae32556611316acb6b2fe15b59ad5370dc2a /ext
parentd258bcd95122aad4d944cc601c1b0eeddd9a8d01 (diff)
downloadphp-git-223d122caeb65ab2f495891b604883b7db1b7032.tar.gz
MFH: use the ZEND_ACC_DEPRECATED flag rather than custom warnings
Diffstat (limited to 'ext')
-rw-r--r--ext/mcrypt/mcrypt.c12
-rw-r--r--ext/mcrypt/php_mcrypt.h1
-rw-r--r--ext/mysql/php_mysql.c18
-rw-r--r--ext/standard/basic_functions.c12
-rw-r--r--ext/standard/streamsfuncs.c9
-rw-r--r--ext/standard/streamsfuncs.h1
6 files changed, 10 insertions, 43 deletions
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index 4f04977652..afee47e99a 100644
--- a/ext/mcrypt/mcrypt.c
+++ b/ext/mcrypt/mcrypt.c
@@ -63,7 +63,7 @@ zend_function_entry mcrypt_functions[] = {
PHP_FE(mcrypt_generic_init, NULL)
PHP_FE(mcrypt_generic, NULL)
PHP_FE(mdecrypt_generic, NULL)
- PHP_FE(mcrypt_generic_end, NULL)
+ PHP_DEP_FALIAS(mcrypt_generic_end, mcrypt_generic_deinit, NULL)
PHP_FE(mcrypt_generic_deinit, NULL)
PHP_FE(mcrypt_enc_self_test, NULL)
@@ -604,16 +604,6 @@ PHP_FUNCTION(mcrypt_module_close)
/* }}} */
-/* {{{ proto bool mcrypt_generic_end(resource td)
- This function terminates encrypt specified by the descriptor td */
-PHP_FUNCTION(mcrypt_generic_end)
-{
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "This function is deprecated, please use mcrypt_generic_deinit()");
- zif_mcrypt_generic_deinit(INTERNAL_FUNCTION_PARAM_PASSTHRU);
-}
-/* }}} */
-
-
/* {{{ proto bool mcrypt_generic_deinit(resource td)
This function terminates encrypt specified by the descriptor td */
PHP_FUNCTION(mcrypt_generic_deinit)
diff --git a/ext/mcrypt/php_mcrypt.h b/ext/mcrypt/php_mcrypt.h
index 64c5e5522e..871e96f6e5 100644
--- a/ext/mcrypt/php_mcrypt.h
+++ b/ext/mcrypt/php_mcrypt.h
@@ -52,7 +52,6 @@ PHP_FUNCTION(mcrypt_module_open);
PHP_FUNCTION(mcrypt_generic_init);
PHP_FUNCTION(mcrypt_generic);
PHP_FUNCTION(mdecrypt_generic);
-PHP_FUNCTION(mcrypt_generic_end);
PHP_FUNCTION(mcrypt_generic_deinit);
PHP_FUNCTION(mcrypt_enc_self_test);
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index ea90ee49e0..e509cf7803 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -133,15 +133,15 @@ zend_function_entry mysql_functions[] = {
PHP_FE(mysql_select_db, NULL)
#ifndef NETWARE /* The below two functions not supported on NetWare */
#if MYSQL_VERSION_ID < 40000
- PHP_FE(mysql_create_db, NULL)
- PHP_FE(mysql_drop_db, NULL)
+ PHP_DEP_FE(mysql_create_db, NULL)
+ PHP_DEP_FE(mysql_drop_db, NULL)
#endif
#endif /* NETWARE */
PHP_FE(mysql_query, NULL)
PHP_FE(mysql_unbuffered_query, NULL)
PHP_FE(mysql_db_query, NULL)
PHP_FE(mysql_list_dbs, NULL)
- PHP_FE(mysql_list_tables, NULL)
+ PHP_DEP_FE(mysql_list_tables, NULL)
PHP_FE(mysql_list_fields, NULL)
PHP_FE(mysql_list_processes, NULL)
PHP_FE(mysql_error, NULL)
@@ -192,15 +192,15 @@ zend_function_entry mysql_functions[] = {
PHP_FALIAS(mysql_selectdb, mysql_select_db, NULL)
#ifndef NETWARE /* The below two functions not supported on NetWare */
#if MYSQL_VERSION_ID < 40000
- PHP_FALIAS(mysql_createdb, mysql_create_db, NULL)
- PHP_FALIAS(mysql_dropdb, mysql_drop_db, NULL)
+ PHP_DEP_FALIAS(mysql_createdb, mysql_create_db, NULL)
+ PHP_DEP_FALIAS(mysql_dropdb, mysql_drop_db, NULL)
#endif
#endif /* NETWARE */
PHP_FALIAS(mysql_freeresult, mysql_free_result, NULL)
PHP_FALIAS(mysql_numfields, mysql_num_fields, NULL)
PHP_FALIAS(mysql_numrows, mysql_num_rows, NULL)
PHP_FALIAS(mysql_listdbs, mysql_list_dbs, NULL)
- PHP_FALIAS(mysql_listtables, mysql_list_tables, NULL)
+ PHP_DEP_FALIAS(mysql_listtables,mysql_list_tables, NULL)
PHP_FALIAS(mysql_listfields, mysql_list_fields, NULL)
PHP_FALIAS(mysql_db_name, mysql_result, NULL)
PHP_FALIAS(mysql_dbname, mysql_result, NULL)
@@ -1155,8 +1155,6 @@ PHP_FUNCTION(mysql_create_db)
break;
}
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "This function is deprecated, please use mysql_query() to issue a SQL CREATE DATABASE statement instead.");
-
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
PHPMY_UNBUFFERED_QUERY_CHECK();
@@ -1198,9 +1196,6 @@ PHP_FUNCTION(mysql_drop_db)
break;
}
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "This function is deprecated, please use mysql_query() to issue a SQL DROP DATABASE statement instead.");
-
-
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
convert_to_string_ex(db);
@@ -1452,7 +1447,6 @@ PHP_FUNCTION(mysql_list_tables)
WRONG_PARAM_COUNT;
break;
}
- php_error_docref(NULL TSRMLS_CC, E_STRICT, "mysql_list_tables() is deprecated");
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
convert_to_string_ex(db);
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 0c38cc3e11..46f49f03ee 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -456,8 +456,8 @@ zend_function_entry basic_functions[] = {
PHP_FE(error_log, NULL)
PHP_FE(call_user_func, NULL)
PHP_FE(call_user_func_array, NULL)
- PHP_FE(call_user_method, second_arg_force_ref)
- PHP_FE(call_user_method_array, second_arg_force_ref)
+ PHP_DEP_FE(call_user_method, second_arg_force_ref)
+ PHP_DEP_FE(call_user_method_array, second_arg_force_ref)
PHP_FE(serialize, NULL)
PHP_FE(unserialize, NULL)
@@ -612,7 +612,7 @@ zend_function_entry basic_functions[] = {
PHP_FE(stream_set_write_buffer, NULL)
PHP_FALIAS(set_file_buffer, stream_set_write_buffer, NULL)
- PHP_FE(set_socket_blocking, NULL)
+ PHP_DEP_FALIAS(set_socket_blocking, stream_set_blocking, NULL)
PHP_FE(stream_set_blocking, NULL)
PHP_FALIAS(socket_set_blocking, stream_set_blocking, NULL)
@@ -2175,8 +2175,6 @@ PHP_FUNCTION(call_user_func_array)
}
/* }}} */
-#define _CUM_DEPREC "This function is deprecated, use the call_user_func variety with the array(&$obj, \"method\") syntax instead"
-
/* {{{ proto mixed call_user_method(string method_name, mixed object [, mixed parameter] [, mixed ...])
Call a user method on a specific object or class */
PHP_FUNCTION(call_user_method)
@@ -2185,8 +2183,6 @@ PHP_FUNCTION(call_user_method)
zval *retval_ptr;
int arg_count = ZEND_NUM_ARGS();
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s", _CUM_DEPREC);
-
if (arg_count < 2) {
WRONG_PARAM_COUNT;
}
@@ -2222,8 +2218,6 @@ PHP_FUNCTION(call_user_method_array)
HashTable *params_ar;
int num_elems, element = 0;
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s", _CUM_DEPREC);
-
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &method_name, &obj, &params) == FAILURE) {
WRONG_PARAM_COUNT;
}
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c
index 5b4f0a68e9..6fb8f17b14 100644
--- a/ext/standard/streamsfuncs.c
+++ b/ext/standard/streamsfuncs.c
@@ -1225,15 +1225,6 @@ PHP_FUNCTION(stream_set_blocking)
/* }}} */
-/* {{{ proto bool set_socket_blocking(resource socket, int mode)
- Set blocking/non-blocking mode on a socket */
-PHP_FUNCTION(set_socket_blocking)
-{
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "This function is deprecated, use stream_set_blocking() instead");
- PHP_FN(stream_set_blocking)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
-}
-/* }}} */
-
/* {{{ proto bool stream_set_timeout(resource stream, int seconds, int microseconds)
Set timeout on stream read to seconds + microseonds */
#if HAVE_SYS_TIME_H || defined(PHP_WIN32)
diff --git a/ext/standard/streamsfuncs.h b/ext/standard/streamsfuncs.h
index 77d5320fa8..57c5e0290a 100644
--- a/ext/standard/streamsfuncs.h
+++ b/ext/standard/streamsfuncs.h
@@ -33,7 +33,6 @@ PHP_FUNCTION(stream_socket_sendto);
PHP_FUNCTION(stream_copy_to_stream);
PHP_FUNCTION(stream_get_contents);
-PHP_FUNCTION(set_socket_blocking); /* deprecated */
PHP_FUNCTION(stream_set_blocking);
PHP_FUNCTION(stream_select);
PHP_FUNCTION(stream_set_timeout);