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

Method adjustVarArgs

stack.go:329–341  ·  view source on GitHub ↗
(p *prototype, argCount int)

Source from the content-addressed store, hash-verified

327}
328
329func (l *State) adjustVarArgs(p *prototype, argCount int) int {
330 fixedArgCount := p.parameterCount
331 l.assert(argCount >= fixedArgCount)
332 // move fixed parameters to final position
333 fixed := l.top - argCount // first fixed argument
334 base := l.top // final position of first argument
335 fixedArgs := l.stack[fixed : fixed+fixedArgCount]
336 copy(l.stack[base:base+fixedArgCount], fixedArgs)
337 for i := range fixedArgs {
338 fixedArgs[i] = nil
339 }
340 return base
341}
342
343func (l *State) postCall(firstResult int) bool {
344 ci := l.callInfo

Callers 1

preCallMethod · 0.95

Calls 1

assertMethod · 0.95

Tested by

no test coverage detected