Skip to content

Commit 977012b

Browse files
kddnewtonmatzbot
authored andcommitted
[ruby/prism] Remove restrict to fix windows 2015
ruby/prism@f0a2ce1c0e
1 parent ec159fc commit 977012b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

prism/extension.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ parse(int argc, VALUE *argv, VALUE self) {
756756
* An implementation of fgets that is suitable for use with Ruby IO objects.
757757
*/
758758
static char *
759-
parse_stream_fgets(char *restrict string, int size, void *restrict stream) {
759+
parse_stream_fgets(char *string, int size, void *stream) {
760760
RUBY_ASSERT(size > 0);
761761

762762
VALUE line = rb_funcall((VALUE) stream, rb_intern("gets"), 1, INT2FIX(size - 1));

prism/prism.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ PRISM_EXPORTED_FUNCTION pm_node_t * pm_parse(pm_parser_t *parser);
8484
* stream. It closely mirrors that of fgets so that fgets can be used as the
8585
* default implementation.
8686
*/
87-
typedef char * (pm_parse_stream_fgets_t)(char *restrict string, int size, void *restrict stream);
87+
typedef char * (pm_parse_stream_fgets_t)(char *string, int size, void *stream);
8888

8989
/**
9090
* Parse a stream of Ruby source and return the tree.

0 commit comments

Comments
 (0)