Check-in [79f4d09e57]
Overview
Comment:Added comments
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 79f4d09e57f54383044525e4b49b46da41e94f53
User & Date: rkeene on 2014-07-16 04:14:36
Other Links: manifest | tags
Context
2014-07-16
13:38
Updated tcl.m4 to print fewer errors looking for tclsh check-in: 105dd6812a user: rkeene tags: trunk
04:14
Added comments check-in: 79f4d09e57 user: rkeene tags: trunk
04:13
More work on wrapping Tcl for consumption by C check-in: a88c66196a user: rkeene tags: trunk
Changes

Modified tcc4tcl.tcl from [990ffbcf98] to [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 "\}"