FAQ
hello marcus,

after a long interval, I've restarted to hack PHP and ZE again, and I
found that zend_call_method could take only 2 args at most...(I just
wanted to call methods w/ 3 or more args in my extensions:)

I think we can easily rewrite this w/ va_list, and since most of the
extensions are call zend_call_method() via zend_call_method_with* macro
so that no BC breaking things will happen.

# AFAIK only spl use zend_call_method() directly and perhaps we can
easily sync w/ updated interfaces (TSRM fixes will do)

pathces are here:
[PHP_5_2 / PHP_5_3]
http://labs.gree.jp/data/patch/zend_interfaces_var_list.php_5_2.patch

[HEAD]
http://labs.gree.jp/data/patch/zend_interfaces_var_list.head.patch

# C99 feature (__VA_ARGS__) is used in my patch for HEAD...(is it
acceptable?)

if this is ok, it's much appreciated if you apply these patches. thank you.

--
Masaki Fujimoto
<fujimoto@php.net>

Search Discussions

  • Marcus Boerger at Jan 31, 2008 at 4:27 pm
    Hello Masaki,

    unfortunately we cannot use any C99 extension and must stick to C89.
    Also I do not really see a reason to use ... in the actual function
    definition. The reason for the way the function is written, is to avoid
    using emalloc. Now, we can probably live with up to four parameters for
    PHP 5.3 and HEAD. But we cannot allow this in 5.2 as it would be an API
    change. So if you can comeup with a change that will simply add two
    parameters for zend_call_method() and provide the two additionla macros
    as well as fixing the ones being present already then *I* think it is
    fine.

    marcus

    Thursday, January 31, 2008, 3:58:51 PM, you wrote:
    hello marcus,
    after a long interval, I've restarted to hack PHP and ZE again, and I
    found that zend_call_method could take only 2 args at most...(I just
    wanted to call methods w/ 3 or more args in my extensions:)
    I think we can easily rewrite this w/ va_list, and since most of the
    extensions are call zend_call_method() via zend_call_method_with* macro
    so that no BC breaking things will happen.
    # AFAIK only spl use zend_call_method() directly and perhaps we can
    easily sync w/ updated interfaces (TSRM fixes will do)
    pathces are here:
    [PHP_5_2 / PHP_5_3]
    http://labs.gree.jp/data/patch/zend_interfaces_var_list.php_5_2.patch
    [HEAD]
    http://labs.gree.jp/data/patch/zend_interfaces_var_list.head.patch
    # C99 feature (__VA_ARGS__) is used in my patch for HEAD...(is it
    acceptable?)
    if this is ok, it's much appreciated if you apply these patches. thank you.
    --
    Masaki Fujimoto
    <fujimoto@php.net>



    Best regards,
    Marcus
  • Masaki Fujimoto at Feb 1, 2008 at 6:00 am
    it seems really unfortunate...:) but I understand your reasons, and then
    I'm looking forward to fixes in 5.3 or 6. thank you!

    Marcus Boerger wrotes:
    Hello Masaki,

    unfortunately we cannot use any C99 extension and must stick to C89.
    Also I do not really see a reason to use ... in the actual function
    definition. The reason for the way the function is written, is to avoid
    using emalloc. Now, we can probably live with up to four parameters for
    PHP 5.3 and HEAD. But we cannot allow this in 5.2 as it would be an API
    change. So if you can comeup with a change that will simply add two
    parameters for zend_call_method() and provide the two additionla macros
    as well as fixing the ones being present already then *I* think it is
    fine.

    marcus

    Thursday, January 31, 2008, 3:58:51 PM, you wrote:
    hello marcus,
    after a long interval, I've restarted to hack PHP and ZE again, and I
    found that zend_call_method could take only 2 args at most...(I just
    wanted to call methods w/ 3 or more args in my extensions:)
    I think we can easily rewrite this w/ va_list, and since most of the
    extensions are call zend_call_method() via zend_call_method_with* macro
    so that no BC breaking things will happen.
    # AFAIK only spl use zend_call_method() directly and perhaps we can
    easily sync w/ updated interfaces (TSRM fixes will do)
    pathces are here:
    [PHP_5_2 / PHP_5_3]
    http://labs.gree.jp/data/patch/zend_interfaces_var_list.php_5_2.patch
    [HEAD]
    http://labs.gree.jp/data/patch/zend_interfaces_var_list.head.patch
    # C99 feature (__VA_ARGS__) is used in my patch for HEAD...(is it
    acceptable?)
    if this is ok, it's much appreciated if you apply these patches. thank you.
    --
    Masaki Fujimoto
    <fujimoto@php.net>



    Best regards,
    Marcus
    --
    Masaki Fujimoto
    <fujimoto@php.net>
  • Marcus Boerger at Feb 2, 2008 at 12:53 pm
    Hello Masaki,

    I did not say in any word that you cannot get those 3 and 4 param
    versions. All I am saying is that the use of C99 va-macros is not possible.
    Simply come up with a va-macro (and emalloc) free implementation and we
    can add it.

    marcus

    Friday, February 1, 2008, 7:00:09 AM, you wrote:
    it seems really unfortunate...:) but I understand your reasons, and then
    I'm looking forward to fixes in 5.3 or 6. thank you!
    Marcus Boerger wrotes:
    Hello Masaki,

    unfortunately we cannot use any C99 extension and must stick to C89.
    Also I do not really see a reason to use ... in the actual function
    definition. The reason for the way the function is written, is to avoid
    using emalloc. Now, we can probably live with up to four parameters for
    PHP 5.3 and HEAD. But we cannot allow this in 5.2 as it would be an API
    change. So if you can comeup with a change that will simply add two
    parameters for zend_call_method() and provide the two additionla macros
    as well as fixing the ones being present already then *I* think it is
    fine.

    marcus

    Thursday, January 31, 2008, 3:58:51 PM, you wrote:
    hello marcus,
    after a long interval, I've restarted to hack PHP and ZE again, and I
    found that zend_call_method could take only 2 args at most...(I just
    wanted to call methods w/ 3 or more args in my extensions:)
    I think we can easily rewrite this w/ va_list, and since most of the
    extensions are call zend_call_method() via zend_call_method_with* macro
    so that no BC breaking things will happen.
    # AFAIK only spl use zend_call_method() directly and perhaps we can
    easily sync w/ updated interfaces (TSRM fixes will do)
    pathces are here:
    [PHP_5_2 / PHP_5_3]
    http://labs.gree.jp/data/patch/zend_interfaces_var_list.php_5_2.patch
    [HEAD]
    http://labs.gree.jp/data/patch/zend_interfaces_var_list.head.patch
    # C99 feature (__VA_ARGS__) is used in my patch for HEAD...(is it
    acceptable?)
    if this is ok, it's much appreciated if you apply these patches. thank you.
    --
    Masaki Fujimoto
    <fujimoto@php.net>



    Best regards,
    Marcus
    --
    Masaki Fujimoto
    <fujimoto@php.net>



    Best regards,
    Marcus

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedJan 31, '08 at 2:58p
activeFeb 2, '08 at 12:53p
posts4
users2
websitephp.net

2 users in discussion

Marcus Boerger: 2 posts Masaki Fujimoto: 2 posts

People

Translate

site design / logo © 2022 Grokbase