Skip to content

Commit

Permalink
Support PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamsxin committed Dec 7, 2021
1 parent 9dd47db commit 8c6f33e
Show file tree
Hide file tree
Showing 22 changed files with 202 additions and 31 deletions.
20 changes: 17 additions & 3 deletions ext/async/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1487,9 +1487,12 @@ void async_channel_ce_register()
async_channel_ce = zend_register_internal_class(&ce);
async_channel_ce->ce_flags |= ZEND_ACC_FINAL;
async_channel_ce->create_object = async_channel_object_create;
#if PHP_VERSION_ID >= 80100
async_channel_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_channel_ce->serialize = zend_class_serialize_deny;
async_channel_ce->unserialize = zend_class_unserialize_deny;

#endif
memcpy(&async_channel_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_channel_handlers.free_obj = async_channel_object_destroy;
async_channel_handlers.dtor_obj = async_channel_object_dtor;
Expand All @@ -1501,9 +1504,12 @@ void async_channel_ce_register()
async_channel_group_ce = zend_register_internal_class(&ce);
async_channel_group_ce->ce_flags |= ZEND_ACC_FINAL;
async_channel_group_ce->create_object = async_channel_group_object_create;
#if PHP_VERSION_ID >= 80100
async_channel_group_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_channel_group_ce->serialize = zend_class_serialize_deny;
async_channel_group_ce->unserialize = zend_class_unserialize_deny;
#endif
memcpy(&async_channel_group_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_channel_group_handlers.free_obj = async_channel_group_object_destroy;
async_channel_group_handlers.dtor_obj = async_channel_group_object_dtor;
Expand All @@ -1514,8 +1520,12 @@ void async_channel_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async", "ChannelIterator", channel_iterator_functions);
async_channel_iterator_ce = zend_register_internal_class(&ce);
async_channel_iterator_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_channel_iterator_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_channel_iterator_ce->serialize = zend_class_serialize_deny;
async_channel_iterator_ce->unserialize = zend_class_unserialize_deny;
#endif

memcpy(&async_channel_iterator_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_channel_iterator_handlers.free_obj = async_channel_iterator_object_destroy;
Expand All @@ -1527,9 +1537,13 @@ void async_channel_ce_register()
async_channel_select_ce = zend_register_internal_class(&ce);
async_channel_select_ce->ce_flags |= ZEND_ACC_FINAL;
async_channel_select_ce->create_object = NULL;
#if PHP_VERSION_ID >= 80100
async_channel_select_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_channel_select_ce->serialize = zend_class_serialize_deny;
async_channel_select_ce->unserialize = zend_class_unserialize_deny;

#endif

memcpy(&async_channel_select_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_channel_select_handlers.offset = XtOffsetOf(async_channel_select, std);
async_channel_select_handlers.free_obj = async_channel_select_object_destroy;
Expand Down
12 changes: 10 additions & 2 deletions ext/async/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,9 +793,13 @@ void async_console_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async\\Stream", "ReadablePipe", async_readable_pipe_functions);
async_readable_pipe_ce = zend_register_internal_class(&ce);
async_readable_pipe_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_readable_pipe_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_readable_pipe_ce->serialize = zend_class_serialize_deny;
async_readable_pipe_ce->unserialize = zend_class_unserialize_deny;

#endif

zend_class_implements(async_readable_pipe_ce, 1, async_readable_stream_ce);

memcpy(&async_readable_pipe_handlers, &std_object_handlers, sizeof(zend_object_handlers));
Expand All @@ -806,9 +810,13 @@ void async_console_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async\\Stream", "WritablePipe", async_writable_pipe_functions);
async_writable_pipe_ce = zend_register_internal_class(&ce);
async_writable_pipe_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_writable_pipe_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_writable_pipe_ce->serialize = zend_class_serialize_deny;
async_writable_pipe_ce->unserialize = zend_class_unserialize_deny;

#endif

zend_class_implements(async_writable_pipe_ce, 1, async_writable_stream_ce);

memcpy(&async_writable_pipe_handlers, &std_object_handlers, sizeof(zend_object_handlers));
Expand Down
13 changes: 12 additions & 1 deletion ext/async/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,12 @@ void async_context_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async", "Context", async_context_functions);
async_context_ce = zend_register_internal_class(&ce);
async_context_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_context_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_context_ce->serialize = zend_class_serialize_deny;
async_context_ce->unserialize = zend_class_unserialize_deny;
#endif

memcpy(&async_context_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_context_handlers.free_obj = async_context_object_destroy;
Expand All @@ -817,9 +821,12 @@ void async_context_ce_register()
async_context_var_ce = zend_register_internal_class(&ce);
async_context_var_ce->ce_flags |= ZEND_ACC_FINAL;
async_context_var_ce->create_object = async_context_var_object_create;
#if PHP_VERSION_ID >= 80100
async_context_var_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_context_var_ce->serialize = zend_class_serialize_deny;
async_context_var_ce->unserialize = zend_class_unserialize_deny;

#endif
memcpy(&async_context_var_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_context_var_handlers.free_obj = async_context_var_object_destroy;
async_context_var_handlers.clone_obj = NULL;
Expand All @@ -828,8 +835,12 @@ void async_context_ce_register()
async_cancellation_handler_ce = zend_register_internal_class(&ce);
async_cancellation_handler_ce->ce_flags |= ZEND_ACC_FINAL;
async_cancellation_handler_ce->create_object = NULL;
#if PHP_VERSION_ID >= 80100
async_cancellation_handler_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_cancellation_handler_ce->serialize = zend_class_serialize_deny;
async_cancellation_handler_ce->unserialize = zend_class_unserialize_deny;
#endif

memcpy(&async_cancellation_handler_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_cancellation_handler_handlers.free_obj = async_cancellation_handler_object_destroy;
Expand Down
8 changes: 8 additions & 0 deletions ext/async/deferred.c
Original file line number Diff line number Diff line change
Expand Up @@ -1283,8 +1283,12 @@ void async_deferred_ce_register()
async_deferred_ce = zend_register_internal_class(&ce);
async_deferred_ce->ce_flags |= ZEND_ACC_FINAL;
async_deferred_ce->create_object = async_deferred_object_create;
#if PHP_VERSION_ID >= 80100
async_deferred_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_deferred_ce->serialize = zend_class_serialize_deny;
async_deferred_ce->unserialize = zend_class_unserialize_deny;
#endif

memcpy(&async_deferred_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_deferred_handlers.offset = XtOffsetOf(async_deferred, std);
Expand Down Expand Up @@ -1325,8 +1329,12 @@ void async_deferred_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async", "DeferredAwaitable", deferred_awaitable_functions);
async_deferred_awaitable_ce = zend_register_internal_class(&ce);
async_deferred_awaitable_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_deferred_awaitable_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_deferred_awaitable_ce->serialize = zend_class_serialize_deny;
async_deferred_awaitable_ce->unserialize = zend_class_unserialize_deny;
#endif

memcpy(&async_deferred_awaitable_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_deferred_awaitable_handlers.offset = XtOffsetOf(async_deferred_awaitable, std);
Expand Down
4 changes: 4 additions & 0 deletions ext/async/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -1315,8 +1315,12 @@ void async_dns_ce_register()
async_dns_query_ce = zend_register_internal_class(&ce);
async_dns_query_ce->ce_flags |= ZEND_ACC_FINAL;
async_dns_query_ce->create_object = async_dns_query_object_create;
#if PHP_VERSION_ID >= 80100
async_dns_query_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_dns_query_ce->serialize = zend_class_serialize_deny;
async_dns_query_ce->unserialize = zend_class_unserialize_deny;
#endif

memcpy(&async_dns_query_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_dns_query_handlers.offset = XtOffsetOf(async_dns_query, std);
Expand Down
12 changes: 12 additions & 0 deletions ext/async/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,12 @@ void async_event_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async", "PollEvent", poll_event_functions);
async_poll_event_ce = zend_register_internal_class(&ce);
async_poll_event_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_poll_event_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_poll_event_ce->serialize = zend_class_serialize_deny;
async_poll_event_ce->unserialize = zend_class_unserialize_deny;
#endif

memcpy(&async_poll_event_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_poll_event_handlers.dtor_obj = async_poll_event_object_dtor;
Expand All @@ -822,8 +826,12 @@ void async_event_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async", "TickEvent", tick_event_functions);
async_tick_event_ce = zend_register_internal_class(&ce);
async_tick_event_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_tick_event_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_tick_event_ce->serialize = zend_class_serialize_deny;
async_tick_event_ce->unserialize = zend_class_unserialize_deny;
#endif

memcpy(&async_tick_event_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_tick_event_handlers.free_obj = async_tick_event_object_destroy;
Expand All @@ -832,8 +840,12 @@ void async_event_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async", "TimerEvent", timer_event_functions);
async_timer_event_ce = zend_register_internal_class(&ce);
async_timer_event_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_timer_event_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_timer_event_ce->serialize = zend_class_serialize_deny;
async_timer_event_ce->unserialize = zend_class_unserialize_deny;
#endif

memcpy(&async_timer_event_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_timer_event_handlers.dtor_obj = async_timer_event_object_dtor;
Expand Down
9 changes: 8 additions & 1 deletion ext/async/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1361,8 +1361,12 @@ void async_pipe_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async\\Network", "Pipe", async_pipe_functions);
async_pipe_ce = zend_register_internal_class(&ce);
async_pipe_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_pipe_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_pipe_ce->serialize = zend_class_serialize_deny;
async_pipe_ce->unserialize = zend_class_unserialize_deny;
#endif

zend_class_implements(async_pipe_ce, 1, async_socket_stream_ce);

Expand All @@ -1374,9 +1378,12 @@ void async_pipe_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async\\Network", "PipeServer", async_pipe_server_functions);
async_pipe_server_ce = zend_register_internal_class(&ce);
async_pipe_server_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_pipe_server_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_pipe_server_ce->serialize = zend_class_serialize_deny;
async_pipe_server_ce->unserialize = zend_class_unserialize_deny;
#endif
zend_class_implements(async_pipe_server_ce, 1, async_server_ce);

memcpy(&async_pipe_server_handlers, &std_object_handlers, sizeof(zend_object_handlers));
Expand Down
5 changes: 4 additions & 1 deletion ext/async/process/builder.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,12 @@ void async_process_builder_ce_register()
async_process_builder_ce = zend_register_internal_class(&ce);
async_process_builder_ce->ce_flags |= ZEND_ACC_FINAL;
async_process_builder_ce->create_object = async_process_builder_object_create;
#if PHP_VERSION_ID >= 80100
async_process_builder_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_process_builder_ce->serialize = zend_class_serialize_deny;
async_process_builder_ce->unserialize = zend_class_unserialize_deny;

#endif
memcpy(&async_process_builder_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_process_builder_handlers.free_obj = async_process_builder_object_destroy;
async_process_builder_handlers.clone_obj = NULL;
Expand Down
15 changes: 12 additions & 3 deletions ext/async/process/runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,9 +1019,12 @@ void async_process_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async\\Process", "Process", async_process_functions);
async_process_ce = zend_register_internal_class(&ce);
async_process_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_process_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_process_ce->serialize = zend_class_serialize_deny;
async_process_ce->unserialize = zend_class_unserialize_deny;

#endif
memcpy(&async_process_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_process_handlers.dtor_obj = async_process_object_dtor;
async_process_handlers.free_obj = async_process_object_destroy;
Expand All @@ -1031,9 +1034,12 @@ void async_process_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async\\Process", "ReadablePipe", async_readable_process_pipe_functions);
async_readable_process_pipe_ce = zend_register_internal_class(&ce);
async_readable_process_pipe_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_readable_process_pipe_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_readable_process_pipe_ce->serialize = zend_class_serialize_deny;
async_readable_process_pipe_ce->unserialize = zend_class_unserialize_deny;

#endif
memcpy(&async_readable_process_pipe_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_readable_process_pipe_handlers.free_obj = async_readable_process_pipe_object_destroy;
async_readable_process_pipe_handlers.clone_obj = NULL;
Expand All @@ -1043,9 +1049,12 @@ void async_process_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async\\Process", "WritablePipe", async_writable_process_pipe_functions);
async_writable_process_pipe_ce = zend_register_internal_class(&ce);
async_writable_process_pipe_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_writable_process_pipe_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_writable_process_pipe_ce->serialize = zend_class_serialize_deny;
async_writable_process_pipe_ce->unserialize = zend_class_unserialize_deny;

#endif
memcpy(&async_writable_process_pipe_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_writable_process_pipe_handlers.free_obj = async_writable_process_pipe_object_destroy;
async_writable_process_pipe_handlers.clone_obj = NULL;
Expand Down
20 changes: 16 additions & 4 deletions ext/async/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1986,9 +1986,12 @@ void async_stream_ce_register()
async_readable_memory_stream_ce = zend_register_internal_class(&ce);
async_readable_memory_stream_ce->ce_flags |= ZEND_ACC_FINAL;
async_readable_memory_stream_ce->create_object = async_readable_memory_stream_object_create;
#if PHP_VERSION_ID >= 80100
async_readable_memory_stream_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_readable_memory_stream_ce->serialize = zend_class_serialize_deny;
async_readable_memory_stream_ce->unserialize = zend_class_unserialize_deny;

#endif
zend_class_implements(async_readable_memory_stream_ce, 1, async_readable_stream_ce);

memcpy(&async_readable_memory_stream_handlers, &std_object_handlers, sizeof(zend_object_handlers));
Expand All @@ -1999,9 +2002,12 @@ void async_stream_ce_register()
async_writable_memory_stream_ce = zend_register_internal_class(&ce);
async_writable_memory_stream_ce->ce_flags |= ZEND_ACC_FINAL;
async_writable_memory_stream_ce->create_object = async_writable_memory_stream_object_create;
#if PHP_VERSION_ID >= 80100
async_writable_memory_stream_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_writable_memory_stream_ce->serialize = zend_class_serialize_deny;
async_writable_memory_stream_ce->unserialize = zend_class_unserialize_deny;

#endif
zend_class_implements(async_writable_memory_stream_ce, 1, async_writable_stream_ce);

memcpy(&async_writable_memory_stream_handlers, &std_object_handlers, sizeof(zend_object_handlers));
Expand All @@ -2011,9 +2017,12 @@ void async_stream_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async\\Stream", "StreamReader", async_stream_reader_functions);
async_stream_reader_ce = zend_register_internal_class(&ce);
async_stream_reader_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_stream_reader_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_stream_reader_ce->serialize = zend_class_serialize_deny;
async_stream_reader_ce->unserialize = zend_class_unserialize_deny;

#endif
zend_class_implements(async_stream_reader_ce, 1, async_readable_stream_ce);

memcpy(&async_stream_reader_handlers, &std_object_handlers, sizeof(zend_object_handlers));
Expand All @@ -2023,9 +2032,12 @@ void async_stream_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async\\Stream", "StreamWriter", async_stream_writer_functions);
async_stream_writer_ce = zend_register_internal_class(&ce);
async_stream_writer_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_stream_writer_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_stream_writer_ce->serialize = zend_class_serialize_deny;
async_stream_writer_ce->unserialize = zend_class_unserialize_deny;

#endif
zend_class_implements(async_stream_writer_ce, 1, async_writable_stream_ce);

memcpy(&async_stream_writer_handlers, &std_object_handlers, sizeof(zend_object_handlers));
Expand Down
5 changes: 4 additions & 1 deletion ext/async/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,12 @@ void async_sync_ce_register()
async_sync_condition_ce = zend_register_internal_class(&ce);
async_sync_condition_ce->ce_flags |= ZEND_ACC_FINAL;
async_sync_condition_ce->create_object = async_sync_condition_object_create;
#if PHP_VERSION_ID >= 80100
async_sync_condition_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_sync_condition_ce->serialize = zend_class_serialize_deny;
async_sync_condition_ce->unserialize = zend_class_unserialize_deny;

#endif
memcpy(&async_sync_condition_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_sync_condition_handlers.free_obj = async_sync_condition_object_destroy;
async_sync_condition_handlers.dtor_obj = async_sync_condition_object_dtor;
Expand Down
15 changes: 12 additions & 3 deletions ext/async/task.c
Original file line number Diff line number Diff line change
Expand Up @@ -2232,9 +2232,12 @@ void async_task_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async", "AwaitableImpl", empty_funcs);
async_awaitable_impl_ce = zend_register_internal_class(&ce);
async_awaitable_impl_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_awaitable_impl_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_awaitable_impl_ce->serialize = zend_class_serialize_deny;
async_awaitable_impl_ce->unserialize = zend_class_unserialize_deny;

#endif
memcpy(&async_awaitable_impl_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_awaitable_impl_handlers.offset = XtOffsetOf(async_awaitable_impl, std);
async_awaitable_impl_handlers.free_obj = async_awaitable_impl_object_destroy;
Expand Down Expand Up @@ -2266,9 +2269,12 @@ void async_task_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async", "Task", task_functions);
async_task_ce = zend_register_internal_class(&ce);
async_task_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_task_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_task_ce->serialize = zend_class_serialize_deny;
async_task_ce->unserialize = zend_class_unserialize_deny;

#endif
memcpy(&async_task_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_task_handlers.offset = XtOffsetOf(async_task, std);
async_task_handlers.free_obj = async_task_object_destroy;
Expand Down Expand Up @@ -2300,9 +2306,12 @@ void async_task_ce_register()
INIT_NS_CLASS_ENTRY(ce, "Phalcon\\Async", "TaskScheduler", task_scheduler_functions);
async_task_scheduler_ce = zend_register_internal_class(&ce);
async_task_scheduler_ce->ce_flags |= ZEND_ACC_FINAL;
#if PHP_VERSION_ID >= 80100
async_task_scheduler_ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE;
#else
async_task_scheduler_ce->serialize = zend_class_serialize_deny;
async_task_scheduler_ce->unserialize = zend_class_unserialize_deny;

#endif
memcpy(&async_task_scheduler_handlers, &std_object_handlers, sizeof(zend_object_handlers));
async_task_scheduler_handlers.free_obj = async_task_scheduler_object_destroy;
async_task_scheduler_handlers.clone_obj = NULL;
Expand Down
Loading

0 comments on commit 8c6f33e

Please sign in to comment.