diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2024-07-17 12:03:21 -0400 |
|---|---|---|
| committer | Kevin Newton <kddnewton@gmail.com> | 2024-07-17 13:58:58 -0400 |
| commit | 7993b88eeec79cce14b04c37f91b0adc3ee1e14f (patch) | |
| tree | 38bfb316cdbd6b1dac28ab70b932edfd5c6d068b | |
| parent | 99825a539f990dff7e0d7cae082ab195a82ffaa5 (diff) | |
[PRISM] Use StringValuePtr for fgets for Prism stream parsing
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11188
| -rw-r--r-- | prism_compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/prism_compile.c b/prism_compile.c index acdb57661a..c68d552eca 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -10501,8 +10501,8 @@ pm_parse_stdin_fgets(char *string, int size, void *stream) return NULL; } - const char *cstr = StringValueCStr(line); - size_t length = strlen(cstr); + const char *cstr = StringValuePtr(line); + long length = rb_str_strlen(line); memcpy(string, cstr, length); string[length] = '\0'; |
