Regular API function

simPackTable / sim.packTable

Description Packs a table into a buffer. The table may contain other nested tables, nil, boolean, number or string values. All other types (e.g. functions) will be considered as string or nil values. You can also use sim.packTable to quickly compare two tables or to perform a deep copy of a table. See also sim.unpackTable, the other stack functions and the other packing/unpacking functions.
C synopsis simChar* simPackTable(simInt stackHandle,simInt* bufferSize)
C parameters
stackHandle: a stack handle obtained with simCreateStack. There must be a table located at the top of the stack.
bufferSize: the size of the returned buffer.
C return value
nullptr in case of an error, otherwise a data buffer. The user is in charge of releasing the returned buffer with simReleaseBuffer.
Lua synopsis string buffer=sim.packTable(table[] aTable)
Lua parameters
aTable: a script table.
Lua return values
buffer: a string buffer.