1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* enum.c: use constants in id.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-10-30 00:40:56 +00:00
parent 6c416e96f0
commit 786e4ce25a
3 changed files with 10 additions and 7 deletions

View file

@ -1,3 +1,7 @@
Sat Oct 30 09:40:54 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* enum.c: use constants in id.h.
Sat Oct 30 09:08:27 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/fiddle/closure.c (fiddle_closure): embed cif not reference

View file

@ -549,7 +549,7 @@ dmyencoding.$(OBJEXT): {$(VPATH)}dmyencoding.c $(RUBY_H_INCLUDES) \
encoding.$(OBJEXT): {$(VPATH)}encoding.c $(RUBY_H_INCLUDES) \
$(ENCODING_H_INCLUDES) {$(VPATH)}regenc.h {$(VPATH)}util.h
enum.$(OBJEXT): {$(VPATH)}enum.c $(RUBY_H_INCLUDES) {$(VPATH)}node.h \
{$(VPATH)}util.h
{$(VPATH)}util.h $(ID_H_INCLUDES)
enumerator.$(OBJEXT): {$(VPATH)}enumerator.c $(RUBY_H_INCLUDES)
error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}known_errors.inc \
$(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) $(ENCODING_H_INCLUDES) \

11
enum.c
View file

@ -12,9 +12,13 @@
#include "ruby/ruby.h"
#include "ruby/util.h"
#include "node.h"
#include "id.h"
VALUE rb_mEnumerable;
static ID id_each, id_eqq, id_cmp, id_next, id_size;
static ID id_next;
#define id_each idEach
#define id_eqq idEqq
#define id_cmp idCmp
static VALUE
enum_values_pack(int argc, VALUE *argv)
@ -2659,10 +2663,5 @@ Init_Enumerable(void)
rb_define_method(rb_mEnumerable, "chunk", enum_chunk, -1);
rb_define_method(rb_mEnumerable, "slice_before", enum_slice_before, -1);
id_eqq = rb_intern("===");
id_each = rb_intern("each");
id_cmp = rb_intern("<=>");
id_next = rb_intern("next");
id_size = rb_intern("size");
}