Created
September 14, 2016 19:30
-
-
Save resuna/5081a944b7d9898d2375ea2cb4c4da0d to your computer and use it in GitHub Desktop.
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
// Defn of ClientData: | |
// #ifndef _CLIENTDATA | |
// # ifndef NO_VOID | |
// typedef void *ClientData; | |
// # else | |
// typedef int *ClientData; | |
// # endif | |
// # define _CLIENTDATA | |
// #endif | |
// swift_tcl_bridger - this is the trampoline that gets called by Tcl when invoking a created Swift command | |
// this declaration is the Swift equivalent of Tcl_ObjCmdProc *proc | |
func swift_tcl_bridger (clientData: ClientData?, interp: UnsafeMutablePointer<Tcl_Interp>?, objc: Int32, objv: UnsafePointer<UnsafeMutablePointer<Tcl_Obj>?>?) -> Int32 { | |
let tcb = UnsafeMutablePointer<TclCommandBlock>(clientData!).pointee | |
"can't invoke an initializer for type UnsafeMutablePointer<TclCommandBlock> with an argument list of type (clientData)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment