// DefineConst defines a constant within this class. func (c *Class) DefineConst(name string, value Value) { cs := C.CString(name) defer C.free(unsafe.Pointer(cs)) C.mrb_define_const( c.mrb.state, c.class, cs, value.MrbValue(c.mrb).value) }
func (m *MRuby) DefineConst(class *C.struct_RClass, name string, value C.mrb_value) { C.mrb_define_const(m.state, class, C.CString(name), value) }
// DefineConst defines a constant within this class. func (c *Class) DefineConst(name string, value Value) { C.mrb_define_const( c.mrb.state, c.class, C.CString(name), value.MrbValue(c.mrb).value) }