]> granicus.if.org Git - php/commitdiff
MFH: use the ZEND_ACC_DEPRECATED flag rather than custom warnings
authorHannes Magnusson <bjori@php.net>
Mon, 26 Jun 2006 16:33:39 +0000 (16:33 +0000)
committerHannes Magnusson <bjori@php.net>
Mon, 26 Jun 2006 16:33:39 +0000 (16:33 +0000)
ext/mcrypt/mcrypt.c
ext/mcrypt/php_mcrypt.h
ext/mysql/php_mysql.c
ext/standard/basic_functions.c
ext/standard/streamsfuncs.c
ext/standard/streamsfuncs.h

index 4f04977652e015b94e383d6dac21e19b8b29de42..afee47e99afa80f8c696e2ab9b1e83fb08095187 100644 (file)
@@ -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)
index 64c5e5522ee15fae80c86b96faf070f7411e2733..871e96f6e5700d52a26dcf583f72b1bfcf34292c 100644 (file)
@@ -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);
index ea90ee49e0673e5bc66b29b499f8fea5be733394..e509cf7803f46387916199c2a336687029d678c3 100644 (file)
@@ -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);
index 0c38cc3e11ddf77f3671a50589b317b215173440..46f49f03eea25389d7375c77a46d9eab76f285d6 100644 (file)
@@ -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;
        }
index 5b4f0a68e957cc98fac65e2276d9cdeea9beae02..6fb8f17b146e883117ad0b6b7be0085ed156b0cb 100644 (file)
@@ -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)
index 77d5320fa8f8e7a1945e5dc8b8a5c0a8d4e3d0d7..57c5e0290a0e34ac5c32260a17d6afe450e7cd3d 100644 (file)
@@ -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);