Commit be69262
authored
gen_stub: drop support for
* gen_stub: drop support for `@refcount 0` with scalar return
Currenty, if `@refcount` is omitted, it is assumed to be 0 for scalar return
types and "N" otherwise. On the other hand, if `@refcount` is provided, for a
scalar return type it *must* be 0, and for a non-scalar return type it
*must not* be 0. In other words, the ref count will be 0 if and only if the
return type is scalar, regardless of whether the `@refcount` tag is used.
In that case, adding `@refcount 0` does nothing, and since its presence
suggests it does something (why would a developer add code that does nothing?)
it is confusing and should be removed. As it happens, there are currently no
uses of `@refcount 0` in php-src, but why should we allow future uses?
Removing this support also allows simplifying the code a bit.@refcount 0 with scalar return (#16505)1 parent 8b68274 commit be69262
1 file changed
+7
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1159 | 1159 | | |
1160 | 1160 | | |
1161 | 1161 | | |
1162 | | - | |
1163 | | - | |
| 1162 | + | |
1164 | 1163 | | |
1165 | 1164 | | |
1166 | 1165 | | |
| |||
1204 | 1203 | | |
1205 | 1204 | | |
1206 | 1205 | | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
1213 | 1210 | | |
1214 | 1211 | | |
1215 | | - | |
1216 | | - | |
| 1212 | + | |
| 1213 | + | |
1217 | 1214 | | |
1218 | 1215 | | |
1219 | 1216 | | |
| |||
0 commit comments