Tcl Source Code

Artifact [c361d901a7]
Login

Artifact c361d901a71f8a81faf773a2dec12c624d8d36dd:

Attachment "Tcl_TransferResult.doc" to ticket [1723738fff] added by eriklns 2007-08-29 02:27:34.
*** This draft text has been intended as an addition to an existing Tcl manual page ***
*** See the correspondig TIP for considerations w.r.t. to the receiving manual page ***

 NAME
=====
Tcl_TransferResult -- transfer interp result and error info between different Tcl interpreters


 SYNOPIS
========
void
Tcl_TransferResult(sourceInterp, result, targetInterp)


 ARGUMENTS
==========
Tcl_Interp *sourceInterp (in)
	token for the interpreter whose result is to be transferred.

Tcl_Interp *targetInterp (in)
	token for the interpreter to which the result is to be transferred.

int result (in)
	integer indicating whether error info is to be transferred additionally.


 DESCRIPTION
============
Tcl_TransferResult moves the interp result of sourceInterp to targetInterp. If result equals TCL_OK, then only the interp result is moved. If result equals TCL_ERROR, error info is copied additionally. Copying error info will also update the Tcl variables errorInfo and errorCode in the target interp. After the transfer, sourceInterp will have its result reset 

Tcl_TransferResult does not require that source interpreter and target interpreter are related in any way (e.g. like a master-slave hierarchy): any two interpreters can be used.


 SEE ALSO
=========
Tcl_CreateInterp