MCPcopy Index your code
hub / github.com/Shopify/go-lua / CreateTable

Method CreateTable

lua.go:1039–1041  ·  view source on GitHub ↗

CreateTable creates a new empty table and pushes it onto the stack. arrayCount is a hint for how many elements the table will have as a sequence; recordCount is a hint for how many other elements the table will have. Lua may use these hints to preallocate memory for the the new table. This pre-all

(arrayCount, recordCount int)

Source from the content-addressed store, hash-verified

1037//
1038// http://www.lua.org/manual/5.2/manual.html#lua_createtable
1039func (l *State) CreateTable(arrayCount, recordCount int) {
1040 l.apiPush(newTableWithSize(arrayCount, recordCount))
1041}
1042
1043// MetaTable pushes onto the stack the metatable of the value at index. If
1044// the value at index does not have a metatable, the function returns

Callers 6

TestTableNextFunction · 0.95
NewTableMethod · 0.95
StringOpenFunction · 0.80
table.goFile · 0.80
createSearchersTableFunction · 0.80
NewLibraryTableFunction · 0.80

Calls 2

apiPushMethod · 0.95
newTableWithSizeFunction · 0.85

Tested by 1

TestTableNextFunction · 0.76