From 655136d4e6f3a1d0e643d32e29fc3bb586c6ba83 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 27 Feb 2011 01:27:36 +0000 Subject: rb_const_set => rb_define_const It's shorter and the library is smaller this way. --- mahoro.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/mahoro.c b/mahoro.c index 4b125b0..f99346a 100644 --- a/mahoro.c +++ b/mahoro.c @@ -170,18 +170,18 @@ void Init_mahoro(void) cMahoro = rb_define_class("Mahoro", rb_cObject); eMahoroError = rb_define_class_under(cMahoro, "Error", rb_eStandardError); - rb_const_set(cMahoro, rb_intern("NONE"), INT2FIX(MAGIC_NONE)); - rb_const_set(cMahoro, rb_intern("DEBUG"), INT2FIX(MAGIC_DEBUG)); - rb_const_set(cMahoro, rb_intern("SYMLINK"), INT2FIX(MAGIC_SYMLINK)); - rb_const_set(cMahoro, rb_intern("COMPRESS"), INT2FIX(MAGIC_COMPRESS)); - rb_const_set(cMahoro, rb_intern("DEVICES"), INT2FIX(MAGIC_DEVICES)); - rb_const_set(cMahoro, rb_intern("MIME"), INT2FIX(MAGIC_MIME)); - rb_const_set(cMahoro, rb_intern("CONTINUE"), INT2FIX(MAGIC_CONTINUE)); - rb_const_set(cMahoro, rb_intern("CHECK"), INT2FIX(MAGIC_CHECK)); - rb_const_set(cMahoro, rb_intern("PRESERVE_ATIME"), + rb_define_const(cMahoro, "NONE", INT2FIX(MAGIC_NONE)); + rb_define_const(cMahoro, "DEBUG", INT2FIX(MAGIC_DEBUG)); + rb_define_const(cMahoro, "SYMLINK", INT2FIX(MAGIC_SYMLINK)); + rb_define_const(cMahoro, "COMPRESS", INT2FIX(MAGIC_COMPRESS)); + rb_define_const(cMahoro, "DEVICES", INT2FIX(MAGIC_DEVICES)); + rb_define_const(cMahoro, "MIME", INT2FIX(MAGIC_MIME)); + rb_define_const(cMahoro, "CONTINUE", INT2FIX(MAGIC_CONTINUE)); + rb_define_const(cMahoro, "CHECK", INT2FIX(MAGIC_CHECK)); + rb_define_const(cMahoro, "PRESERVE_ATIME", INT2FIX(MAGIC_PRESERVE_ATIME)); - rb_const_set(cMahoro, rb_intern("RAW"), INT2FIX(MAGIC_RAW)); - rb_const_set(cMahoro, rb_intern("ERROR"), INT2FIX(MAGIC_ERROR)); + rb_define_const(cMahoro, "RAW", INT2FIX(MAGIC_RAW)); + rb_define_const(cMahoro, "ERROR", INT2FIX(MAGIC_ERROR)); rb_define_alloc_func(cMahoro, mahoro_allocate); rb_define_method(cMahoro, "initialize", mahoro_initialize, -1); -- cgit v1.2.3-24-ge0c7