stevedonovan/luar — pull request #9 by hirochachacha (2013-07-10 11:25:57+00:00)
Title: Add int family and support for custom type

Hi, I made PR.
1st commit is support for custom type like,

```go
package main

import "github.com/stevedonovan/luar"
import "fmt"

import "reflect"

type A int

const code = `
a = 10
`

func main() {
L := luar.Init()
defer L.Close()

a := A(5)

luar.Register(L, "", luar.Map{
"a": a,
})

err := L.DoString(code)
if err != nil {
panic(err)
}
L.GetGlobal("a")
aType := reflect.TypeOf(a)
b := luar.LuaToGo(L, aType, -1)
t := reflect.TypeOf(b)

fmt.Println(t == aType) // expected true, but false
}
```

2nd commit is related to #8.
Now, this code run expectedly.

```go
package main

import "github.com/stevedonovan/luar"

const code = `
print(a.test) -- expected nil
print(a[5]) -- expected raise type converting error
`

func main() {
L := luar.Init()
defer L.Close()

a := map[string]string{"test": "art"}

luar.Register(L, "", luar.Map{
"a": a,
})

err := L.DoString(code)
if err != nil {
panic(err)
}
}
```