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
Prior to this commit, the code created an array describing an input
argument, adding it to a list of all the arguments, and later went
through that list using a grep to reconstruct some information that had
been lost (because the array didn't include all the needed relevant
information), and placed the result in its final form.
This commit moves the calculation of the final form to earlier, where it
first is encountered. This means all the information is available, and
no grep is needed.
Code review revealed a subtlety here. The moved code has an
if $nullok
but prior to this commit, there were two different $nullok variables,
with slightly different meanings. Prior to this commit, the moved code
was using the second $nullok; afterwards, the first one. Hence, even
though the name is the same, before and after, it is a different
variable, with a (slightly) different meaning.
The second $nullok was populated by the grep, and meant that the
argument did not have either a NN nor a NZ modifier.
The first $nullok meant simply that the arg had a NULLOK modifier.
After the commit the single $nullok means that the arg had a NULLOK
modifier.
This change actually has no effect (as demonstrated by the fact that
this commit doesn't change the generated proto.h). The moved code is
executed only for an argument where $type_asserts{$argtype} exists.
This hash is constant, and has been populated so that only pointer
arguments have entries. NZ is not valid for pointer arguments, so we
know that both before and after this commit, the arg did not have an NZ
modifier. Also it is illegal to specify both NN and NULLOK, so both
before and after this commit, the arg did not have a NN modifier. And
both before and after this commit the arg does have a NULLOK modifier.
0 commit comments