chagned Value_t to use unsafe.Pointer

This commit is contained in:
2023-08-14 01:08:37 +09:00
parent ca5c1efd8a
commit bff0c3b31d
4 changed files with 107 additions and 76 deletions

View File

@ -71,10 +71,10 @@ func main() {
goto oops
}
if v == nil {
panic("return value mut not be nil")
if v.Kind != pcl.VALUE_STR {
panic("return value must not be string")
}
fmt.Printf("RETURN VALUE = [%s]\n", *v.(*string))
fmt.Printf("RETURN VALUE = [%s]\n", *(*string)(v.V))
interp.Close()
f.Close()