Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ const (
// Utils
//------------------------------------------------------------------------------

// IsComplete returns true if s is a complete TCL command.
func IsComplete(s string) bool {
cs := C.CString(s)
defer C.free(unsafe.Pointer(cs))
if C.Tcl_CommandComplete(cs) != 0 {
return true
}
return false
}

// A handle that is used to manipulate a TCL interpreter. All handle methods
// can be safely invoked from different threads. Each method invocation is
// synchronous, it means that the method will be blocked until the action is
Expand Down