You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP internals supports a clever struct allocation hack that allows you to allocate arbitrary memory in front of zend_objects to store any C data. Then OffsetOf can be used to "find" this data later effectively allowing you to embed anything into a object. This is the NG replacement for the old resource type.
I'd like to start a discussion around supporting this in Zephir. As I believe it is a pretty significant shortcoming between the types of extensions one can write using the native C API vs the higher level Zephir DSL.
Maybe something like the function optimizers that we already have for calling C code. But an object optimizer that allows us to define the object structure and hook the object_handlers.
I understand PHP internals but Zephir internals is new to me
The text was updated successfully, but these errors were encountered:
PHP internals supports a clever struct allocation hack that allows you to allocate arbitrary memory in front of zend_objects to store any C data. Then OffsetOf can be used to "find" this data later effectively allowing you to embed anything into a object. This is the NG replacement for the old resource type.
I'd like to start a discussion around supporting this in Zephir. As I believe it is a pretty significant shortcoming between the types of extensions one can write using the native C API vs the higher level Zephir DSL.
Maybe something like the function optimizers that we already have for calling C code. But an object optimizer that allows us to define the object structure and hook the object_handlers.
I understand PHP internals but Zephir internals is new to me
The text was updated successfully, but these errors were encountered: