Diff

Differences From Artifact [990ffbcf98]:

To Artifact [ee6fa4b450]:


264
265
266
267
268
269
270

271
272

273
274
275
276

277
278
279
280
281
282
283
264
265
266
267
268
269
270
271
272

273
274
275
276
277
278
279
280
281
282
283
284
285







+

-
+




+







				}
				default {
					return -code error "Unknown type: $type"
				}
			}
			_ccode $handle "    if (!Tcl_ObjSetVar2(${interp_name}, Tcl_NewStringObj(\"${arg}\", -1), NULL, _$arg, 0)) $return_failure;"
		}
		_ccode $handle ""

		_ccode $handle ""
		# Evaluate script
		_ccode $handle "    tclrv = Tcl_Eval($interp_name, \"$cbody\");"
		_ccode $handle "    if (tclrv != TCL_OK && tclrv != TCL_RETURN) $return_failure;"
		_ccode $handle ""

		# Handle return value
		if {$rtype != "ok" && $rtype != "void"} {
			_ccode $handle "    rv_interp = Tcl_GetObjResult(${interp_name});"
		}

		switch -- $rtype {
			void { }
			ok {
306
307
308
309
310
311
312

313
314
315
316
317
318
319
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322







+







				_ccode $handle "    rv = Tcl_GetString(rv_interp);"
			}
			Tcl_Obj* {
				_ccode $handle "    rv = rv_interp;"
			}
		}

		# Return value
		_ccode $handle ""
		if {$rtype != "void"} {
			_ccode $handle "    return(rv);"
		} else {
			_ccode $handle "    return;"
		}
		_ccode $handle "\}"