Commit 3caf15a
committed
gen_stub: drop support for
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.
In the process, I also renamed some of the constants for clarity.@refcount 0 with scalar return1 parent a00c734 commit 3caf15a
1 file changed
+9
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1155 | 1155 | | |
1156 | 1156 | | |
1157 | 1157 | | |
1158 | | - | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
1159 | 1161 | | |
1160 | 1162 | | |
1161 | 1163 | | |
1162 | | - | |
1163 | | - | |
| 1164 | + | |
1164 | 1165 | | |
1165 | 1166 | | |
1166 | 1167 | | |
| |||
1200 | 1201 | | |
1201 | 1202 | | |
1202 | 1203 | | |
1203 | | - | |
| 1204 | + | |
1204 | 1205 | | |
1205 | 1206 | | |
1206 | 1207 | | |
1207 | | - | |
1208 | | - | |
| 1208 | + | |
| 1209 | + | |
1209 | 1210 | | |
1210 | 1211 | | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
| 1212 | + | |
| 1213 | + | |
1217 | 1214 | | |
1218 | 1215 | | |
1219 | 1216 | | |
| |||
0 commit comments