Skip to content

Commit 1495882

Browse files
TysonAndrenikic
authored andcommitted
Fix opcache optimizer info for time_nanosleep (again)
Fixes my earlier PR #4617 If I remember correctly, The F0 macro is used for return values that are guaranteed to not be reference counted. The F1 macro is used for return values that may have up to 1 reference (i.e. MAY_BE_RC1). I didn't notice that time_nanosleep needed to be F1 since it could return an array, and that array is reference counted.
1 parent 2b06165 commit 1495882

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/opcache/Optimizer/zend_func_info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static const func_info_t func_infos[] = {
146146
F0("sleep", MAY_BE_FALSE | MAY_BE_LONG),
147147
F0("usleep", MAY_BE_NULL | MAY_BE_FALSE),
148148
#if HAVE_NANOSLEEP
149-
F0("time_nanosleep", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG),
149+
F1("time_nanosleep", MAY_BE_FALSE | MAY_BE_TRUE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG),
150150
F0("time_sleep_until", MAY_BE_FALSE | MAY_BE_TRUE),
151151
#endif
152152
#if HAVE_STRPTIME

0 commit comments

Comments
 (0)