# small patch to Zend

- Thread: https://externals.io/message/16169
- Original archive: https://news-web.php.net/php.internals/16169
- Started by val khokhlov on 2005-05-07T16:56:35+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #16169 — val khokhlov — 2005-05-07T16:56:35+00:00

URL: https://externals.io/message/16169#16169

Hello,

      small patch just to make zend_do_inheritance() exportable
      (I need this Zend function in my extension)


-- 
Best regards,
 val                          mailto:val@vk.kiev.ua

---

## #16170 — Marcus Boerger — 2005-05-07T21:57:43+00:00

URL: https://externals.io/message/16169#16170 · In reply to: #16169

Hello val,

  may i ask what you need it for?

Saturday, May 7, 2005, 6:56:35 PM, you wrote:

> Hello,

>       small patch just to make zend_do_inheritance() exportable
>       (I need this Zend function in my extension)





-- 
Best regards,
 Marcus                            mailto:mail@marcus-boerger.de

---

## #16171 — val khokhlov — 2005-05-08T08:13:46+00:00

URL: https://externals.io/message/16169#16171 · In reply to: #16170

Hello Marcus,

Sunday, May 8, 2005, 12:57:43 AM, you wrote:

> > […]
MB>   may i ask what you need it for?
        yes, when creating a class (restoring from bytecodes) with defined
parent i need to setup inheritance (as zend_compile.c does).
        in php4 i can do it myself with

        zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0);
        zend_hash_merge(&ce->function_table, &parent_ce->function_table, (void (*)(void *)) function_add_ref, &tmp_zend_function, sizeof(zend_function), 0);
        ce->parent = parent_ce;
        if (!ce->handle_property_get)
           ce->handle_property_get      = parent_ce->handle_property_get;
        if (!ce->handle_property_set)
           ce->handle_property_set = parent_ce->handle_property_set;
        if (!ce->handle_function_call)
           ce->handle_function_call = parent_ce->handle_function_call;

        but in php5 there're too many functions that handle inheritance, so
i think it's useless to duplicate them

-- 
Best regards,
 val                            mailto:val@vk.kiev.ua
