about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-02-27 01:27:36 +0000
committerEric Wong <normalperson@yhbt.net>2011-02-27 01:29:04 +0000
commit655136d4e6f3a1d0e643d32e29fc3bb586c6ba83 (patch)
tree9db5e12e121dcd58b1d1002f69bcd15d53134cdb
parente619319982d51b495a3a627adfab742433c976e4 (diff)
downloadmahoro-655136d4e6f3a1d0e643d32e29fc3bb586c6ba83.tar.gz
rb_const_set => rb_define_const
It's shorter and the library is smaller this way.
-rw-r--r--mahoro.c22
1 files 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);