Updated todo items

This commit is contained in:
Brandon Dyck 2022-11-27 12:02:24 -07:00
parent 869a2f3e67
commit e37a792176

3
ph7.go
View File

@ -270,7 +270,7 @@ type Value C.ph7_value
// TODO (*Value).IsResource
// TODO (*Value).IsEmpty
// TODO Init
// ph7_lib_init is unnecessary when single-threaded, and possibly always.
// TODO Config
// TODO Shutdown
// TODO IsThreadsafe
@ -354,6 +354,7 @@ type ForeignFunction interface {
//export call_foreign_function
func call_foreign_function(ctx *C.ph7_context, argc C.int, argv **C.ph7_value) C.int {
fkey := C.ph7_context_user_data(ctx)
// TODO it looks like ph7 looks for a VFS at the user data pointer. WTF? Should we use it for that?
f := pointer.Restore(fkey).(ForeignFunction)
args := make([]*Value, 0, argc)
argvSlice := unsafe.Slice(argv, argc)