ruby-changes:51163
From: shyouhei <ko1@a...>
Date: Wed, 9 May 2018 15:55:17 +0900 (JST)
Subject: [ruby-changes:51163] shyouhei:r63370 (trunk): type func(); is different from type func(void);
shyouhei 2018-05-09 15:55:11 +0900 (Wed, 09 May 2018) New Revision: 63370 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63370 Log: type func(); is different from type func(void); If a function declarator includes no parameter list, that doesn't mean the function takes zero parameter. rb_ast_new here does take zero parameter, so it should be explicitly prototypes as (void). Modified files: trunk/node.h Index: node.h =================================================================== --- node.h (revision 63369) +++ node.h (revision 63370) @@ -487,7 +487,7 @@ typedef struct rb_ast_struct { https://github.com/ruby/ruby/blob/trunk/node.h#L487 VALUE mark_ary; rb_ast_body_t body; } rb_ast_t; -rb_ast_t *rb_ast_new(); +rb_ast_t *rb_ast_new(void); void rb_ast_mark(rb_ast_t*); void rb_ast_dispose(rb_ast_t*); void rb_ast_free(rb_ast_t*); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/