Created
July 1, 2011 05:45
-
-
Save crazy2be/1057936 to your computer and use it in GitHub Desktop.
My daily WTF.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func nativecallback_CallAsFunction_go(data_ptr unsafe.Pointer, ctx unsafe.Pointer, obj unsafe.Pointer, thisObject unsafe.Pointer, argumentCount uint, arguments unsafe.Pointer, exception *unsafe.Pointer) unsafe.Pointer { | |
defer func() { | |
if r := recover(); r != nil { | |
*exception = unsafe.Pointer(recover_to_javascript((*Context)(ctx), r)) | |
} | |
}() | |
data := (*object_data)(data_ptr) | |
ret := data.val.Interface().(GoFunctionCallback)( | |
(*Context)(ctx), (*Object)(obj), (*Object)(thisObject), (*[1 << 14]*Value)(arguments)[0:argumentCount]) | |
return unsafe.Pointer(ret) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment