+// Similar, but it binds to the current context's closure (i.e. the
+// namespace at the top of the current call stack).
+naRef naBindToContext(naContext ctx, naRef code);
+
+// Call a code or function object with the specified arguments "on"
+// the specified object and using the specified hash for the local
+// variables. Passing a null args array skips the parameter variables
+// (e.g. "arg") assignments; to get a zero-length arg instead, pass in
+// argc==0 and a non-null args vector. The obj or locals parameters
+// may be nil. Will attempt to acquire the mod lock, so call
+// naModUnlock() first if the lock is already held.
+naRef naCall(naContext ctx, naRef func, int argc, naRef* args,
+ naRef obj, naRef locals);
+
+// As naCall(), but continues execution at the operation after a
+// previous die() call or runtime error. Useful to do "yield"
+// semantics, leaving the context in a condition where it can be
+// restarted from C code. Cannot be used currently to restart a
+// failed operation. Will attempt to acquire the mod lock, so call
+// naModUnlock() first if the lock is already held.
+naRef naContinue(naContext ctx);
+
+// Does a naCall() in a given context. Wrapped here to make lock
+// tracking easier. Extension functions are called with the lock, but
+// we have to release it before making a new naCall(). So rather than
+// drop the lock in every extension function that might call back into
+// Nasal, we keep a stack depth counter here and only unlock/lock
+// around the naCall if it isn't the first one.
+naRef naCallMethodCtx( naContext ctx,
+ naRef code,
+ naRef self,
+ int argc,
+ naRef* args,
+ naRef locals );
+
+// Same as naCallMethodCtx but creates (and afterwards destroyes) a new context
+naRef naCallMethod(naRef code, naRef self, int argc, naRef* args, naRef locals);
+
+typedef void (*naErrorHandler)(naContext);
+
+// Register a handler to be called if an error is raised during the execution of
+// naCallMethodCtx or naCallMethod.
+naErrorHandler naSetErrorHandler(naErrorHandler cb);