Check-in [17b2b81a02]
Overview
Comment:Added syntaxes for byte arrays
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:17b2b81a025f8b6970c485bae2acaffbc4cace37
User & Date: rkeene on 2014-07-16 16:09:48
Other Links: manifest | tags
Context
2014-07-16
16:15
Corrected issue with checking for variables check-in: 37f218e272 user: rkeene tags: trunk
16:09
Added syntaxes for byte arrays check-in: 17b2b81a02 user: rkeene tags: trunk
14:44
Updated to create a proc if we are operating in an existing interpreter, to avoid setting local variables check-in: 500057b0ea user: rkeene tags: trunk
Changes

Modified tcc4tcl.tcl from [e6c673ebab] to [2aaf108bbf].

259
260
261
262
263
264
265





266

267
268
269
270
271
272
273
						}
					}

					_ccode $handle "    _$arg = Tcl_New${convCmd}Obj($arg);"
					_ccode $handle "    if (!_$arg) $return_failure;"
				}
				char* {





					_ccode $handle "    _$arg = Tcl_NewStringObj($arg, -1);"

				}
				Tcl_Obj* {
					_ccode $handle "    _$arg = $arg;"
				}
				default {
					return -code error "Unknown type: $type"
				}







>
>
>
>
>
|
>







259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
						}
					}

					_ccode $handle "    _$arg = Tcl_New${convCmd}Obj($arg);"
					_ccode $handle "    if (!_$arg) $return_failure;"
				}
				char* {
					if {[info exists $types(${arg}_MemberCount)] && [info exists $types(${arg}_MemberLength)]} {
						_ccode $handle "    _$arg = Tcl_NewByteArrayObj($arg, ${arg}_MemberCount * ${arg}_MemberLength);"
					} elseif {[info exists $types(${arg}_Length)]} {
						_ccode $handle "    _$arg = Tcl_NewByteArrayObj($arg, ${arg}_Length);"
					} else {
						_ccode $handle "    _$arg = Tcl_NewStringObj($arg, -1);"
					}
				}
				Tcl_Obj* {
					_ccode $handle "    _$arg = $arg;"
				}
				default {
					return -code error "Unknown type: $type"
				}