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

Function upValueHelper

debug.go:393–404  ·  view source on GitHub ↗
(f func(*State, int, int) (string, bool), returnValueCount int)

Source from the content-addressed store, hash-verified

391}
392
393func upValueHelper(f func(*State, int, int) (string, bool), returnValueCount int) Function {
394 return func(l *State) int {
395 CheckType(l, 1, TypeFunction)
396 name, ok := f(l, 1, CheckInteger(l, 2))
397 if !ok {
398 return 0
399 }
400 l.PushString(name)
401 l.Insert(-returnValueCount)
402 return returnValueCount
403 }
404}
405
406func (l *State) checkUpValue(f, upValueCount int) int {
407 n := CheckInteger(l, upValueCount)

Callers 1

debug.goFile · 0.85

Calls 4

CheckTypeFunction · 0.85
CheckIntegerFunction · 0.85
PushStringMethod · 0.80
InsertMethod · 0.80

Tested by

no test coverage detected