Compare commits

..

No commits in common. "master" and "v0.5.2" have entirely different histories.

3 changed files with 2 additions and 4 deletions

View File

@ -109,7 +109,7 @@ if err != nil {
```
### ToTable(index int) (any, error)
Converts a Lua table to optimal Go type; arrays or `map[string]any`.
Converts a Lua table to optimal Go type ([]int, []string, map[string]any, etc.).
```go
table, err := L.ToTable(-1)
if err != nil {

View File

@ -116,7 +116,7 @@ L.PushValue(stuff) // Handles all Go types automatically
// Lua → Go with automatic type detection
L.GetGlobal("some_table")
result, err := L.ToTable(-1) // Returns optimal Go type (typed array, or map[string]any)
result, err := L.ToTable(-1) // Returns optimal Go type ([]int, map[string]string, etc.)
```
### Table Builder

View File

@ -206,8 +206,6 @@ func (s *State) PushValue(v any) error {
s.PushNumber(val)
case string:
s.PushString(val)
case []byte:
s.PushString(string(val))
case []int:
return s.pushIntSlice(val)
case []string: