Golang C.lua_setmetatable类(方法)实例源码

下面列出了Golang C.lua_setmetatable 类(方法)源码代码实例,从而了解它的用法。

作者:rdlaitil    项目:lea   
// Pops a table from the stack and sets it as the new metatable for the
// value at the given valid index.
func (this *State) Setmetatable(index int) int {
	return int(C.lua_setmetatable(this.luastate, C.int(index)))
}

作者:szl    项目:golu   
// lua_setmetatable
func (L *State) SetMetaTable(index int) {
	C.lua_setmetatable(L.s, C.int(index))
}

作者:halturi    项目:luaji   
// Pops a table from the stack and sets it as the new metatable for the
// value at the given valid index.
func (s *State) Setmetatable(index int) int {
	return int(C.lua_setmetatable(s.l, C.int(index)))
}


问题


面经


文章

微信
公众号

扫码关注公众号