Skip to content

Commit 8a065c5

Browse files
Restored zip/oci8 PHP 4 code, add PHP 7 checks
1 parent 8efe343 commit 8a065c5

File tree

2 files changed

+115
-0
lines changed

2 files changed

+115
-0
lines changed

ext/oci8/oci8.c

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ ZEND_GET_MODULE(oci8)
148148
#endif /* COMPILE_DL */
149149
/* }}} */
150150

151+
#if defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3)
152+
151153
/* {{{ Function arginfo */
152154
ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_define_by_name, 0, 0, 3)
153155
ZEND_ARG_INFO(0, statement_resource)
@@ -643,6 +645,117 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_trim_method, 0, 0, 1)
643645
ZEND_END_ARG_INFO()
644646
/* }}} */
645647

648+
#else /* defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3) */
649+
/* {{{ Keep the old arginfo behavior when building with PHP 4 */
650+
651+
static unsigned char arginfo_ocifetchinto[] = { 2, BYREF_NONE, BYREF_FORCE };
652+
static unsigned char arginfo_oci_fetch_all[] = { 2, BYREF_NONE, BYREF_FORCE };
653+
static unsigned char arginfo_oci_define_by_name[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
654+
static unsigned char arginfo_oci_bind_by_name[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
655+
static unsigned char arginfo_oci_bind_array_by_name[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
656+
657+
#define arginfo_oci_free_descriptor NULL
658+
#define arginfo_oci_lob_save NULL
659+
#define arginfo_oci_lob_import NULL
660+
#define arginfo_oci_lob_load NULL
661+
#define arginfo_oci_lob_read NULL
662+
#define arginfo_oci_lob_eof NULL
663+
#define arginfo_oci_lob_tell NULL
664+
#define arginfo_oci_lob_rewind NULL
665+
#define arginfo_oci_lob_seek NULL
666+
#define arginfo_oci_lob_size NULL
667+
#define arginfo_oci_lob_write NULL
668+
#define arginfo_oci_lob_append NULL
669+
#define arginfo_oci_lob_truncate NULL
670+
#define arginfo_oci_lob_erase NULL
671+
#define arginfo_oci_lob_flush NULL
672+
#define arginfo_ocisetbufferinglob NULL
673+
#define arginfo_ocigetbufferinglob NULL
674+
#define arginfo_oci_lob_copy NULL
675+
#define arginfo_oci_lob_is_equal NULL
676+
#define arginfo_oci_lob_export NULL
677+
#define arginfo_oci_new_descriptor NULL
678+
#define arginfo_oci_rollback NULL
679+
#define arginfo_oci_commit NULL
680+
#define arginfo_oci_field_name NULL
681+
#define arginfo_oci_field_size NULL
682+
#define arginfo_oci_field_scale NULL
683+
#define arginfo_oci_field_precision NULL
684+
#define arginfo_oci_field_type NULL
685+
#define arginfo_oci_field_type_raw NULL
686+
#define arginfo_oci_field_is_null NULL
687+
#define arginfo_oci_internal_debug NULL
688+
#define arginfo_oci_execute NULL
689+
#define arginfo_oci_cancel NULL
690+
#define arginfo_oci_fetch NULL
691+
#define arginfo_oci_fetch_object NULL
692+
#define arginfo_oci_fetch_row NULL
693+
#define arginfo_oci_fetch_assoc NULL
694+
#define arginfo_oci_fetch_array NULL
695+
#define arginfo_oci_free_statement NULL
696+
#define arginfo_oci_close NULL
697+
#define arginfo_oci_new_connect NULL
698+
#define arginfo_oci_connect NULL
699+
#define arginfo_oci_pconnect NULL
700+
#define arginfo_oci_error NULL
701+
#define arginfo_oci_num_fields NULL
702+
#define arginfo_oci_parse NULL
703+
#define arginfo_oci_get_implicit_resultset NULL
704+
#define arginfo_oci_set_prefetch NULL
705+
#define arginfo_oci_set_client_identifier NULL
706+
#define arginfo_oci_set_edition NULL
707+
#define arginfo_oci_set_module_name NULL
708+
#define arginfo_oci_set_action NULL
709+
#define arginfo_oci_set_client_info NULL
710+
#ifdef WAITIING_ORACLE_BUG_16695981_FIX
711+
#define arginfo_oci_set_db_operation NULL
712+
#endif
713+
#define arginfo_oci_password_change NULL
714+
#define arginfo_oci_new_cursor NULL
715+
#define arginfo_oci_result NULL
716+
#define arginfo_oci_client_version NULL
717+
#define arginfo_oci_server_version NULL
718+
#define arginfo_oci_statement_type NULL
719+
#define arginfo_oci_num_rows NULL
720+
#define arginfo_oci_free_collection NULL
721+
#define arginfo_oci_collection_append NULL
722+
#define arginfo_oci_collection_element_get NULL
723+
#define arginfo_oci_collection_assign NULL
724+
#define arginfo_oci_collection_element_assign NULL
725+
#define arginfo_oci_collection_size NULL
726+
#define arginfo_oci_collection_max NULL
727+
#define arginfo_oci_collection_trim NULL
728+
#define arginfo_oci_new_collection NULL
729+
#define arginfo_oci_lob_size_method NULL
730+
#define arginfo_oci_lob_getbuffering_method NULL
731+
#define arginfo_oci_lob_close_method NULL
732+
#define arginfo_oci_lob_save_method NULL
733+
#define arginfo_oci_lob_import_method NULL
734+
#define arginfo_oci_lob_read_method NULL
735+
#define arginfo_oci_lob_seek_method NULL
736+
#define arginfo_oci_lob_write_method NULL
737+
#define arginfo_oci_lob_append_method NULL
738+
#define arginfo_oci_lob_truncate_method NULL
739+
#define arginfo_oci_lob_erase_method NULL
740+
#define arginfo_oci_lob_flush_method NULL
741+
#define arginfo_oci_lob_setbuffering_method NULL
742+
#define arginfo_oci_lob_export_method NULL
743+
#define arginfo_oci_lob_write_temporary_method NULL
744+
#define arginfo_oci_lob_load_method NULL
745+
#define arginfo_oci_lob_tell_method NULL
746+
#define arginfo_oci_lob_rewind_method NULL
747+
#define arginfo_oci_lob_eof_method NULL
748+
#define arginfo_oci_free_descriptor_method NULL
749+
#define arginfo_oci_collection_append_method NULL
750+
#define arginfo_oci_collection_element_get_method NULL
751+
#define arginfo_oci_collection_assign_method NULL
752+
#define arginfo_oci_collection_size_method NULL
753+
#define arginfo_oci_collection_element_assign_method NULL
754+
#define arginfo_oci_collection_max_method NULL
755+
#define arginfo_oci_collection_trim_method NULL
756+
#define arginfo_oci_collection_free_method NULL
757+
/* }}} */
758+
#endif /* defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3) */
646759

647760
/* {{{ extension function prototypes
648761
*/

ext/zip/zip_stream.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#endif
2323
#include "php.h"
2424
#if HAVE_ZIP
25+
#if defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3)
2526

2627
#include "php_streams.h"
2728
#include "ext/standard/file.h"
@@ -347,4 +348,5 @@ php_stream_wrapper php_stream_zip_wrapper = {
347348
NULL,
348349
0 /* is_url */
349350
};
351+
#endif /* defined(ZEND_ENGINE_2) || defined(ZEND_ENGINE_3) */
350352
#endif /* HAVE_ZIP */

0 commit comments

Comments
 (0)