Commit 6b3f302
authored
streams: Re-add support for arbitrary metadata for stream notifier functions (#19158)
Support for attaching arbitrary metadata for consumption by stream notifier
functions got broken in #19024 when the previous `zval ptr` got
changed to `zend_fcall_info_cache *fcc`, making the data specific to the
`user_space_stream_notifier`.
Fix this by changing the field to `void *ptr`, avoiding the indirection through
a `zval`, but preserving the ability to store arbitrary data. If necessary to
support different types than `IS_PTR`, extensions can heap-allocate a `zval` to
store within `->ptr` as a minimal change to keep compatibility with PHP 8.4 or
lower.1 parent 78d96e9 commit 6b3f302
File tree
4 files changed
+16
-12
lines changed- ext/standard
- main/streams
4 files changed
+16
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
872 | | - | |
| 872 | + | |
873 | 873 | | |
874 | 874 | | |
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
878 | 878 | | |
879 | | - | |
880 | | - | |
881 | | - | |
882 | | - | |
883 | | - | |
884 | | - | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
885 | 883 | | |
886 | 884 | | |
887 | 885 | | |
| |||
931 | 929 | | |
932 | 930 | | |
933 | 931 | | |
934 | | - | |
| 932 | + | |
935 | 933 | | |
936 | 934 | | |
937 | 935 | | |
| |||
1128 | 1126 | | |
1129 | 1127 | | |
1130 | 1128 | | |
1131 | | - | |
1132 | | - | |
| 1129 | + | |
| 1130 | + | |
1133 | 1131 | | |
1134 | | - | |
| 1132 | + | |
1135 | 1133 | | |
1136 | 1134 | | |
1137 | 1135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
0 commit comments