equal
deleted
inserted
replaced
50 } |
50 } |
51 } |
51 } |
52 |
52 |
53 if (NIL_P (sub_type)) { |
53 if (NIL_P (sub_type)) { |
54 /* Without sub_type */ |
54 /* Without sub_type */ |
55 m = lm_message_new (to_str, NUM2INT (type)); |
55 m = lm_message_new (to_str, FIX2INT (type)); |
56 } else { |
56 } else { |
57 m = lm_message_new_with_sub_type (to_str, |
57 m = lm_message_new_with_sub_type (to_str, |
58 NUM2INT (type), |
58 FIX2INT (type), |
59 NUM2INT (sub_type)); |
59 FIX2INT (sub_type)); |
60 } |
60 } |
61 |
61 |
62 DATA_PTR (self) = m; |
62 DATA_PTR (self) = m; |
63 |
63 |
64 return self; |
64 return self; |
67 VALUE |
67 VALUE |
68 msg_get_type (VALUE self) |
68 msg_get_type (VALUE self) |
69 { |
69 { |
70 LmMessage *m = rb_lm_message_from_ruby_object (self); |
70 LmMessage *m = rb_lm_message_from_ruby_object (self); |
71 |
71 |
72 return INT2NUM (lm_message_get_type (m)); |
72 return INT2FIX (lm_message_get_type (m)); |
73 } |
73 } |
74 |
74 |
75 VALUE |
75 VALUE |
76 msg_get_sub_type (VALUE self) |
76 msg_get_sub_type (VALUE self) |
77 { |
77 { |
78 LmMessage *m = rb_lm_message_from_ruby_object (self); |
78 LmMessage *m = rb_lm_message_from_ruby_object (self); |
79 |
79 |
80 return INT2NUM (lm_message_get_sub_type (m)); |
80 return INT2FIX (lm_message_get_sub_type (m)); |
81 } |
81 } |
82 |
82 |
83 VALUE |
83 VALUE |
84 msg_get_root_node (VALUE self) |
84 msg_get_root_node (VALUE self) |
85 { |
85 { |