return return_value;
}
-void php_pq_object_write_prop(zval *object, zval *member, zval *value, void **cache_slot)
+php_pq_object_write_prop_t php_pq_object_write_prop(zval *object, zval *member, zval *value, void **cache_slot)
{
php_pq_object_t *obj = PHP_PQ_OBJ(object, NULL);
php_pq_object_prophandler_t *handler;
} else {
zend_get_std_object_handlers()->write_property(object, member, value, cache_slot);
}
+#if PHP_VERSION_ID >= 70400
+ return value;
+#endif
+}
+
+zval *php_pq_object_get_prop_ptr_null(zval *object, zval *member, int type, void **cache_slot)
+{
+ return NULL;
}
void php_pq_object_prophandler_dtor(zval *zv) {
HashTable *php_pq_object_get_gc(zval *object, zval **table, int *n);
extern zend_class_entry *ancestor(zend_class_entry *ce);
extern zval *php_pq_object_read_prop(zval *object, zval *member, int type, void **cache_slot, zval *tmp);
-extern void php_pq_object_write_prop(zval *object, zval *member, zval *value, void **cache_slot);
+#if PHP_VERSION_ID >= 70400
+typedef zval *php_pq_object_write_prop_t;
+#else
+typedef void php_pq_object_write_prop_t;
+#endif
+extern php_pq_object_write_prop_t php_pq_object_write_prop(zval *object, zval *member, zval *value, void **cache_slot);
+extern zval *php_pq_object_get_prop_ptr_null(zval *object, zval *member, int type, void **cache_slot);
extern void php_pq_object_prophandler_dtor(zval *zv);
#endif
php_pqcancel_object_handlers.read_property = php_pq_object_read_prop;
php_pqcancel_object_handlers.write_property = php_pq_object_write_prop;
php_pqcancel_object_handlers.clone_obj = NULL;
- php_pqcancel_object_handlers.get_property_ptr_ptr = NULL;
+ php_pqcancel_object_handlers.get_property_ptr_ptr = php_pq_object_get_prop_ptr_null;
php_pqcancel_object_handlers.get_gc = php_pq_object_get_gc;
php_pqcancel_object_handlers.get_properties = php_pq_object_properties;
php_pqcancel_object_handlers.get_debug_info = php_pq_object_debug_info;
php_pqconn_object_handlers.read_property = php_pq_object_read_prop;
php_pqconn_object_handlers.write_property = php_pq_object_write_prop;
php_pqconn_object_handlers.clone_obj = NULL;
- php_pqconn_object_handlers.get_property_ptr_ptr = NULL;
+ php_pqconn_object_handlers.get_property_ptr_ptr = php_pq_object_get_prop_ptr_null;
php_pqconn_object_handlers.get_gc = php_pq_object_get_gc;
php_pqconn_object_handlers.get_properties = php_pq_object_properties;
php_pqconn_object_handlers.get_debug_info = php_pq_object_debug_info;
php_pqcopy_object_handlers.read_property = php_pq_object_read_prop;
php_pqcopy_object_handlers.write_property = php_pq_object_write_prop;
php_pqcopy_object_handlers.clone_obj = NULL;
- php_pqcopy_object_handlers.get_property_ptr_ptr = NULL;
+ php_pqcopy_object_handlers.get_property_ptr_ptr = php_pq_object_get_prop_ptr_null;
php_pqcopy_object_handlers.get_gc = php_pq_object_get_gc;
php_pqcopy_object_handlers.get_properties = php_pq_object_properties;
php_pqcopy_object_handlers.get_debug_info = php_pq_object_debug_info;
php_pqcur_object_handlers.read_property = php_pq_object_read_prop;
php_pqcur_object_handlers.write_property = php_pq_object_write_prop;
php_pqcur_object_handlers.clone_obj = NULL;
- php_pqcur_object_handlers.get_property_ptr_ptr = NULL;
+ php_pqcur_object_handlers.get_property_ptr_ptr = php_pq_object_get_prop_ptr_null;
php_pqcur_object_handlers.get_gc = php_pq_object_get_gc;
php_pqcur_object_handlers.get_properties = php_pq_object_properties;
php_pqcur_object_handlers.get_debug_info = php_pq_object_debug_info;
php_pqlob_object_handlers.read_property = php_pq_object_read_prop;
php_pqlob_object_handlers.write_property = php_pq_object_write_prop;
php_pqlob_object_handlers.clone_obj = NULL;
- php_pqlob_object_handlers.get_property_ptr_ptr = NULL;
+ php_pqlob_object_handlers.get_property_ptr_ptr = php_pq_object_get_prop_ptr_null;
php_pqlob_object_handlers.get_gc = php_pq_object_get_gc;
php_pqlob_object_handlers.get_properties = php_pq_object_properties;
php_pqlob_object_handlers.get_debug_info = php_pq_object_debug_info;
php_pqres_object_handlers.read_property = php_pq_object_read_prop;
php_pqres_object_handlers.write_property = php_pq_object_write_prop;
php_pqres_object_handlers.clone_obj = NULL;
- php_pqres_object_handlers.get_property_ptr_ptr = NULL;
+ php_pqres_object_handlers.get_property_ptr_ptr = php_pq_object_get_prop_ptr_null;
php_pqres_object_handlers.get_gc = php_pq_object_get_gc;
php_pqres_object_handlers.get_debug_info = php_pq_object_debug_info;
php_pqres_object_handlers.get_properties = php_pq_object_properties;
php_pqstm_object_handlers.read_property = php_pq_object_read_prop;
php_pqstm_object_handlers.write_property = php_pq_object_write_prop;
php_pqstm_object_handlers.clone_obj = NULL;
- php_pqstm_object_handlers.get_property_ptr_ptr = NULL;
+ php_pqstm_object_handlers.get_property_ptr_ptr = php_pq_object_get_prop_ptr_null;
php_pqstm_object_handlers.get_gc = php_pq_object_get_gc;
php_pqstm_object_handlers.get_properties = php_pq_object_properties;
php_pqstm_object_handlers.get_debug_info = php_pq_object_debug_info;
php_pqtxn_object_handlers.read_property = php_pq_object_read_prop;
php_pqtxn_object_handlers.write_property = php_pq_object_write_prop;
php_pqtxn_object_handlers.clone_obj = NULL;
- php_pqtxn_object_handlers.get_property_ptr_ptr = NULL;
+ php_pqtxn_object_handlers.get_property_ptr_ptr = php_pq_object_get_prop_ptr_null;
php_pqtxn_object_handlers.get_gc = php_pq_object_get_gc;
php_pqtxn_object_handlers.get_properties = php_pq_object_properties;
php_pqtxn_object_handlers.get_debug_info = php_pq_object_debug_info;
return data;
}
+static void php_pqtypes_object_write_dimension(zval *object, zval *offset, zval *value)
+{
+ throw_exce(EX_RUNTIME, "pq\\Types object must not be modified");
+}
+
+static void php_pqtypes_object_unset_dimension(zval *object, zval *offset)
+{
+ throw_exce(EX_RUNTIME, "pq\\Types object must not be modified");
+}
+
ZEND_BEGIN_ARG_INFO_EX(ai_pqtypes_construct, 0, 0, 1)
ZEND_ARG_OBJ_INFO(0, connection, pq\\Connection, 0)
ZEND_ARG_ARRAY_INFO(0, namespaces, 1)
php_pqtypes_object_handlers.read_property = php_pq_object_read_prop;
php_pqtypes_object_handlers.write_property = php_pq_object_write_prop;
php_pqtypes_object_handlers.clone_obj = NULL;
- php_pqtypes_object_handlers.get_property_ptr_ptr = NULL;
+ php_pqtypes_object_handlers.get_property_ptr_ptr = php_pq_object_get_prop_ptr_null;
php_pqtypes_object_handlers.get_gc = php_pq_object_get_gc;
php_pqtypes_object_handlers.get_properties = php_pq_object_properties;
php_pqtypes_object_handlers.get_debug_info = php_pq_object_debug_info;
php_pqtypes_object_handlers.has_dimension = php_pqtypes_object_has_dimension;
php_pqtypes_object_handlers.read_dimension = php_pqtypes_object_read_dimension;
- php_pqtypes_object_handlers.unset_dimension = NULL;
- php_pqtypes_object_handlers.write_dimension = NULL;
+ php_pqtypes_object_handlers.unset_dimension = php_pqtypes_object_unset_dimension;
+ php_pqtypes_object_handlers.write_dimension = php_pqtypes_object_write_dimension;
zend_hash_init(&php_pqtypes_object_prophandlers, 1, NULL, php_pq_object_prophandler_dtor, 1);