示例#1
0
文件: mruby.go 项目: ujun/go-mruby
// 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)))
}