예제 #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)))
}