Okay, well... the main pieces of feedback I'd give on it then is to not
change the behavior of the '!' modifier. That's bad BC. Rather, introduce
a new modifier for checking if a parameter was passed. Secondly, make
these two separate patches as the new modifier is a separate feature from
the single-arg parameter parsing.
FWIW, there are a few examples of this being handled by defining the
default value of the parameter to something non-sensical (such as a length
of -1), then doing zpp with "|l!" would leave the default -1 alone when
NULL is passed, and you can treat as "not passed". Granted this is a bit
of a hack and won't work for all situations. Your approach is more
comprehensive, just saying that for many cases it's not strictly needed.
-Sara
On Thu, Jul 19, 2012 at 2:33 PM, Nikita Popov <[email protected]> wrote:
> On Thu, Jul 19, 2012 at 11:23 PM, Sara Golemon <[email protected]> wrote:
> > Then I'm not sure what problem you're trying to solve either. :/
>
> This solves two problems:
>
> a) Integer parameters cannot currently be skipped using NULL. This
> issue comes up every now and then. E.g. see
> https://github.com/php/php-src/pull/133.
>
> b) If you need more complex argument handling you currently have to
> fetch the value as z and then use some convert_to_* function. But
> those convert_to_* functions behave differently than zpp. So a
> function for parsing a single parameter is exposed too.
>
> Nikita
>