Пример #1
0
// DefineModule defines a top-level module.
func (m *Mrb) DefineModule(name string) *Class {
	cs := C.CString(name)
	defer C.free(unsafe.Pointer(cs))
	return newClass(m, C.mrb_define_module(m.state, cs))
}
Пример #2
0
// DefineModule defines a top-level module.
func (m *Mrb) DefineModule(name string) *Class {
	return newClass(m, C.mrb_define_module(m.state, C.CString(name)))
}