]> granicus.if.org Git - php/commitdiff
Removed ZEND_ENGINE_2 checks (and ZE1 code, it's been a decade!)
authorAndrea Faulds <ajf@ajf.me>
Thu, 4 Dec 2014 00:55:11 +0000 (00:55 +0000)
committerAndrea Faulds <ajf@ajf.me>
Fri, 5 Dec 2014 19:46:30 +0000 (19:46 +0000)
ext/mysql/php_mysql.c
ext/oci8/oci8.c
ext/pdo_firebird/firebird_driver.c
ext/xmlwriter/php_xmlwriter.h
ext/zip/zip_stream.c
main/internal_functions_win32.c

index fc1dac5da7ced5e3ebd0fa22e3772de4b1009da6..4fcc9ca83a2e1fad3c2a036ff83c0dd707d02a7a 100644 (file)
 #include "ext/standard/php_string.h"
 #include "ext/standard/basic_functions.h"
 
-#ifdef ZEND_ENGINE_2
-# include "zend_exceptions.h"
-#else
-  /* PHP 4 compat */
-# define OnUpdateLong  OnUpdateInt
-# define E_STRICT              E_NOTICE
-#endif
+#include "zend_exceptions.h"
 
 #if HAVE_MYSQL
 
@@ -2075,7 +2069,6 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
        mysql_row_length_type *mysql_row_lengths;
 #endif
 
-#ifdef ZEND_ENGINE_2
        if (into_object) {
                zend_string *class_name = NULL;
 
@@ -2094,7 +2087,6 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
                }
                result_type = MYSQL_ASSOC;
        } else
-#endif
        {
                if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &res, &result_type) == FAILURE) {
                        return;
@@ -2162,7 +2154,6 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
        mysqlnd_fetch_into(mysql_result, ((result_type & MYSQL_NUM)? MYSQLND_FETCH_NUM:0) | ((result_type & MYSQL_ASSOC)? MYSQLND_FETCH_ASSOC:0), return_value, MYSQLND_MYSQL);
 #endif
 
-#ifdef ZEND_ENGINE_2
        /* mysqlnd might return FALSE if no more rows */
        if (into_object && Z_TYPE_P(return_value) != IS_FALSE) {
                zval dataset;
@@ -2225,7 +2216,6 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
                        zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name->val);
                }
        }
-#endif
 
 }
 /* }}} */
index 122a27fd48dee0e3fc4b525f86ab3a151fbf661d..ad7ac5a239c2064818ad30e80a3912d1c7d759ff 100644 (file)
@@ -148,8 +148,6 @@ ZEND_GET_MODULE(oci8)
 #endif /* COMPILE_DL */
 /* }}} */
 
-#ifdef ZEND_ENGINE_2
-
 /* {{{ Function arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_define_by_name, 0, 0, 3)
        ZEND_ARG_INFO(0, statement_resource)
@@ -645,117 +643,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_trim_method, 0, 0, 1)
 ZEND_END_ARG_INFO()
 /* }}} */
 
-#else /* ZEND_ENGINE_2 */
-/* {{{ Keep the old arginfo behavior when building with PHP 4 */
-
-static unsigned char arginfo_ocifetchinto[]  = { 2, BYREF_NONE, BYREF_FORCE };
-static unsigned char arginfo_oci_fetch_all[] = { 2, BYREF_NONE, BYREF_FORCE };
-static unsigned char arginfo_oci_define_by_name[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
-static unsigned char arginfo_oci_bind_by_name[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
-static unsigned char arginfo_oci_bind_array_by_name[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
-
-#define arginfo_oci_free_descriptor                                            NULL
-#define arginfo_oci_lob_save                                                   NULL
-#define arginfo_oci_lob_import                                                 NULL
-#define arginfo_oci_lob_load                                                   NULL
-#define arginfo_oci_lob_read                                                   NULL
-#define arginfo_oci_lob_eof                                                            NULL
-#define arginfo_oci_lob_tell                                                   NULL
-#define arginfo_oci_lob_rewind                                                 NULL
-#define arginfo_oci_lob_seek                                                   NULL
-#define arginfo_oci_lob_size                                                   NULL
-#define arginfo_oci_lob_write                                                  NULL
-#define arginfo_oci_lob_append                                                 NULL
-#define arginfo_oci_lob_truncate                                               NULL
-#define arginfo_oci_lob_erase                                                  NULL
-#define arginfo_oci_lob_flush                                                  NULL
-#define arginfo_ocisetbufferinglob                                             NULL
-#define arginfo_ocigetbufferinglob                                             NULL
-#define arginfo_oci_lob_copy                                                   NULL
-#define arginfo_oci_lob_is_equal                                               NULL
-#define arginfo_oci_lob_export                                                 NULL
-#define arginfo_oci_new_descriptor                                             NULL
-#define arginfo_oci_rollback                                                   NULL
-#define arginfo_oci_commit                                                             NULL
-#define arginfo_oci_field_name                                                 NULL
-#define arginfo_oci_field_size                                                 NULL
-#define arginfo_oci_field_scale                                                        NULL
-#define arginfo_oci_field_precision                                            NULL
-#define arginfo_oci_field_type                                                 NULL
-#define arginfo_oci_field_type_raw                                             NULL
-#define arginfo_oci_field_is_null                                              NULL
-#define arginfo_oci_internal_debug                                             NULL
-#define arginfo_oci_execute                                                            NULL
-#define arginfo_oci_cancel                                                             NULL
-#define arginfo_oci_fetch                                                              NULL
-#define arginfo_oci_fetch_object                                               NULL
-#define arginfo_oci_fetch_row                                                  NULL
-#define arginfo_oci_fetch_assoc                                                        NULL
-#define arginfo_oci_fetch_array                                                        NULL
-#define arginfo_oci_free_statement                                             NULL
-#define arginfo_oci_close                                                              NULL
-#define arginfo_oci_new_connect                                                        NULL
-#define arginfo_oci_connect                                                            NULL
-#define arginfo_oci_pconnect                                                   NULL
-#define arginfo_oci_error                                                              NULL
-#define arginfo_oci_num_fields                                                 NULL
-#define arginfo_oci_parse                                                              NULL
-#define arginfo_oci_get_implicit_resultset                             NULL
-#define arginfo_oci_set_prefetch                                               NULL
-#define arginfo_oci_set_client_identifier                              NULL
-#define arginfo_oci_set_edition                                                        NULL
-#define arginfo_oci_set_module_name                                            NULL
-#define arginfo_oci_set_action                                                 NULL
-#define arginfo_oci_set_client_info                                            NULL
-#ifdef WAITIING_ORACLE_BUG_16695981_FIX
-#define arginfo_oci_set_db_operation                                   NULL
-#endif
-#define arginfo_oci_password_change                                            NULL
-#define arginfo_oci_new_cursor                                                 NULL
-#define arginfo_oci_result                                                             NULL
-#define arginfo_oci_client_version                                             NULL
-#define arginfo_oci_server_version                                             NULL
-#define arginfo_oci_statement_type                                             NULL
-#define arginfo_oci_num_rows                                                   NULL
-#define arginfo_oci_free_collection                                            NULL
-#define arginfo_oci_collection_append                                  NULL
-#define arginfo_oci_collection_element_get                             NULL
-#define arginfo_oci_collection_assign                                  NULL
-#define arginfo_oci_collection_element_assign                  NULL
-#define arginfo_oci_collection_size                                            NULL
-#define arginfo_oci_collection_max                                             NULL
-#define arginfo_oci_collection_trim                                            NULL
-#define arginfo_oci_new_collection                                             NULL
-#define arginfo_oci_lob_size_method                                            NULL
-#define arginfo_oci_lob_getbuffering_method                            NULL
-#define arginfo_oci_lob_close_method                                   NULL
-#define arginfo_oci_lob_save_method                                            NULL
-#define arginfo_oci_lob_import_method                                  NULL
-#define arginfo_oci_lob_read_method                                            NULL
-#define arginfo_oci_lob_seek_method                                            NULL
-#define arginfo_oci_lob_write_method                                   NULL
-#define arginfo_oci_lob_append_method                                  NULL
-#define arginfo_oci_lob_truncate_method                                        NULL
-#define arginfo_oci_lob_erase_method                                   NULL
-#define arginfo_oci_lob_flush_method                                   NULL
-#define arginfo_oci_lob_setbuffering_method                            NULL
-#define arginfo_oci_lob_export_method                                  NULL
-#define arginfo_oci_lob_write_temporary_method                 NULL
-#define arginfo_oci_lob_load_method                                            NULL
-#define arginfo_oci_lob_tell_method                                            NULL
-#define arginfo_oci_lob_rewind_method                                  NULL
-#define arginfo_oci_lob_eof_method                                             NULL
-#define arginfo_oci_free_descriptor_method                             NULL
-#define arginfo_oci_collection_append_method                   NULL
-#define arginfo_oci_collection_element_get_method              NULL
-#define arginfo_oci_collection_assign_method                   NULL
-#define arginfo_oci_collection_size_method                             NULL
-#define arginfo_oci_collection_element_assign_method   NULL
-#define arginfo_oci_collection_max_method                              NULL
-#define arginfo_oci_collection_trim_method                             NULL
-#define arginfo_oci_collection_free_method                             NULL
-/* }}} */
-#endif /* ZEND_ENGINE_2 */
 
 /* {{{ extension function prototypes
 */
index 298d2539e35a68818dce6bebac1221cf45c927ee..c80f61aa437738a778fa25e585873d2ad25bf285 100644 (file)
@@ -23,9 +23,7 @@
 #define _GNU_SOURCE
 
 #include "php.h"
-#ifdef ZEND_ENGINE_2
-# include "zend_exceptions.h"
-#endif
+#include "zend_exceptions.h"
 #include "php_ini.h"
 #include "ext/standard/info.h"
 #include "pdo/php_pdo.h"
index fc00a9d578d6a56da93d4513fff1b5f8704aeee2..e49e14eb34c2d7ca3d69d39596b18077c2e67ebb 100644 (file)
@@ -37,9 +37,6 @@ extern zend_module_entry xmlwriter_module_entry;
 typedef struct _xmlwriter_object {
        xmlTextWriterPtr ptr;
        xmlBufferPtr output;
-#ifndef ZEND_ENGINE_2
-       xmlOutputBufferPtr uri_output;
-#endif
 } xmlwriter_object;
 
 
index c5423401700007a266bf2ca95b1df2c0e6c6cb38..eb264ace95daa8a5aeff8e312011b9fcbb3dddb1 100644 (file)
@@ -22,7 +22,6 @@
 #endif
 #include "php.h"
 #if HAVE_ZIP
-#ifdef ZEND_ENGINE_2
 
 #include "php_streams.h"
 #include "ext/standard/file.h"
@@ -348,5 +347,4 @@ php_stream_wrapper php_stream_zip_wrapper = {
        NULL,
        0 /* is_url */
 };
-#endif /* ZEND_ENGINE_2 */
 #endif /* HAVE_ZIP */
index 355013f5014703a82277f2c9e57df542eba0e48d..b4718c379faea89673ecf378eedbcbe4e357643d 100644 (file)
 #include <stdlib.h>
 #include <stdio.h>
 
-#ifndef ZEND_ENGINE_2
-#error HEAD does not work with ZendEngine1 anymore
-#endif
-
 #include "ext/standard/dl.h"
 #include "ext/standard/file.h"
 #include "ext/standard/fsock.h"