* 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
Родитель 6c416e96f0
Коммит 786e4ce25a
3 изменённых файлов: 10 добавлений и 7 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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
Просмотреть файл

@ -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");
}