Commits

Genki Sugawara  committed 315f2d3

small fix

  • Participants
  • Parent commits 17cf745

Comments (0)

Files changed (1)

File ext/ruby_binlog.cpp

   rb_cBinlogEvent = rb_define_class_under(rb_mBinlog, "Event", rb_cObject);
   rb_eBinlogError = rb_define_class_under(rb_mBinlog, "Error", rb_eRuntimeError);
 
-  rb_define_const(rb_cBinlogEvent, "UNKNOWN_EVENT",            INT2NUM(0));
-  rb_define_const(rb_cBinlogEvent, "START_EVENT_V3",           INT2NUM(1));
-  rb_define_const(rb_cBinlogEvent, "QUERY_EVENT",              INT2NUM(2));
-  rb_define_const(rb_cBinlogEvent, "STOP_EVENT",               INT2NUM(3));
-  rb_define_const(rb_cBinlogEvent, "ROTATE_EVENT",             INT2NUM(4));
-  rb_define_const(rb_cBinlogEvent, "INTVAR_EVENT",             INT2NUM(5));
-  rb_define_const(rb_cBinlogEvent, "LOAD_EVENT",               INT2NUM(6));
-  rb_define_const(rb_cBinlogEvent, "SLAVE_EVENT",              INT2NUM(7));
-  rb_define_const(rb_cBinlogEvent, "CREATE_FILE_EVENT",        INT2NUM(8));
-  rb_define_const(rb_cBinlogEvent, "APPEND_BLOCK_EVENT",       INT2NUM(9));
-  rb_define_const(rb_cBinlogEvent, "EXEC_LOAD_EVENT",          INT2NUM(10));
-  rb_define_const(rb_cBinlogEvent, "DELETE_FILE_EVENT",        INT2NUM(11));
-  rb_define_const(rb_cBinlogEvent, "NEW_LOAD_EVENT",           INT2NUM(12));
-  rb_define_const(rb_cBinlogEvent, "RAND_EVENT",               INT2NUM(13));
-  rb_define_const(rb_cBinlogEvent, "USER_VAR_EVENT",           INT2NUM(14));
-  rb_define_const(rb_cBinlogEvent, "FORMAT_DESCRIPTION_EVENT", INT2NUM(15));
-  rb_define_const(rb_cBinlogEvent, "XID_EVENT",                INT2NUM(16));
-  rb_define_const(rb_cBinlogEvent, "BEGIN_LOAD_QUERY_EVENT",   INT2NUM(17));
-  rb_define_const(rb_cBinlogEvent, "EXECUTE_LOAD_QUERY_EVENT", INT2NUM(18));
-  rb_define_const(rb_cBinlogEvent, "TABLE_MAP_EVENT",          INT2NUM(19));
-  rb_define_const(rb_cBinlogEvent, "PRE_GA_WRITE_ROWS_EVENT",  INT2NUM(20));
-  rb_define_const(rb_cBinlogEvent, "PRE_GA_UPDATE_ROWS_EVENT", INT2NUM(21));
-  rb_define_const(rb_cBinlogEvent, "PRE_GA_DELETE_ROWS_EVENT", INT2NUM(22));
-  rb_define_const(rb_cBinlogEvent, "WRITE_ROWS_EVENT",         INT2NUM(23));
-  rb_define_const(rb_cBinlogEvent, "UPDATE_ROWS_EVENT",        INT2NUM(24));
-  rb_define_const(rb_cBinlogEvent, "DELETE_ROWS_EVENT",        INT2NUM(25));
-  rb_define_const(rb_cBinlogEvent, "INCIDENT_EVENT",           INT2NUM(26));
-  rb_define_const(rb_cBinlogEvent, "USER_DEFINED",             INT2NUM(27));
+  rb_define_const(rb_cBinlogEvent, "UNKNOWN_EVENT",            INT2NUM(UNKNOWN_EVENT));
+  rb_define_const(rb_cBinlogEvent, "START_EVENT_V3",           INT2NUM(START_EVENT_V3));
+  rb_define_const(rb_cBinlogEvent, "QUERY_EVENT",              INT2NUM(QUERY_EVENT));
+  rb_define_const(rb_cBinlogEvent, "STOP_EVENT",               INT2NUM(STOP_EVENT));
+  rb_define_const(rb_cBinlogEvent, "ROTATE_EVENT",             INT2NUM(ROTATE_EVENT));
+  rb_define_const(rb_cBinlogEvent, "INTVAR_EVENT",             INT2NUM(INTVAR_EVENT));
+  rb_define_const(rb_cBinlogEvent, "LOAD_EVENT",               INT2NUM(LOAD_EVENT));
+  rb_define_const(rb_cBinlogEvent, "SLAVE_EVENT",              INT2NUM(SLAVE_EVENT));
+  rb_define_const(rb_cBinlogEvent, "CREATE_FILE_EVENT",        INT2NUM(CREATE_FILE_EVENT));
+  rb_define_const(rb_cBinlogEvent, "APPEND_BLOCK_EVENT",       INT2NUM(APPEND_BLOCK_EVENT));
+  rb_define_const(rb_cBinlogEvent, "EXEC_LOAD_EVENT",          INT2NUM(EXEC_LOAD_EVENT));
+  rb_define_const(rb_cBinlogEvent, "DELETE_FILE_EVENT",        INT2NUM(DELETE_FILE_EVENT));
+  rb_define_const(rb_cBinlogEvent, "NEW_LOAD_EVENT",           INT2NUM(NEW_LOAD_EVENT));
+  rb_define_const(rb_cBinlogEvent, "RAND_EVENT",               INT2NUM(RAND_EVENT));
+  rb_define_const(rb_cBinlogEvent, "USER_VAR_EVENT",           INT2NUM(USER_VAR_EVENT));
+  rb_define_const(rb_cBinlogEvent, "FORMAT_DESCRIPTION_EVENT", INT2NUM(FORMAT_DESCRIPTION_EVENT));
+  rb_define_const(rb_cBinlogEvent, "XID_EVENT",                INT2NUM(XID_EVENT));
+  rb_define_const(rb_cBinlogEvent, "BEGIN_LOAD_QUERY_EVENT",   INT2NUM(BEGIN_LOAD_QUERY_EVENT));
+  rb_define_const(rb_cBinlogEvent, "EXECUTE_LOAD_QUERY_EVENT", INT2NUM(EXECUTE_LOAD_QUERY_EVENT));
+  rb_define_const(rb_cBinlogEvent, "TABLE_MAP_EVENT",          INT2NUM(TABLE_MAP_EVENT));
+  rb_define_const(rb_cBinlogEvent, "PRE_GA_WRITE_ROWS_EVENT",  INT2NUM(PRE_GA_WRITE_ROWS_EVENT));
+  rb_define_const(rb_cBinlogEvent, "PRE_GA_UPDATE_ROWS_EVENT", INT2NUM(PRE_GA_UPDATE_ROWS_EVENT));
+  rb_define_const(rb_cBinlogEvent, "PRE_GA_DELETE_ROWS_EVENT", INT2NUM(PRE_GA_DELETE_ROWS_EVENT));
+  rb_define_const(rb_cBinlogEvent, "WRITE_ROWS_EVENT",         INT2NUM(WRITE_ROWS_EVENT));
+  rb_define_const(rb_cBinlogEvent, "UPDATE_ROWS_EVENT",        INT2NUM(UPDATE_ROWS_EVENT));
+  rb_define_const(rb_cBinlogEvent, "DELETE_ROWS_EVENT",        INT2NUM(DELETE_ROWS_EVENT));
+  rb_define_const(rb_cBinlogEvent, "INCIDENT_EVENT",           INT2NUM(INCIDENT_EVENT));
+  rb_define_const(rb_cBinlogEvent, "USER_DEFINED",             INT2NUM(USER_DEFINED));
 
   ruby::binlog::Client::init();
   ruby::binlog::QueryEvent::init();