Check-in [57b7fc959d]
Overview
Comment:More additional comments
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:57b7fc959d829f3e499ecbe4729e4a6be9e88871
User & Date: rkeene on 2014-07-19 06:17:01
Other Links: manifest | tags
Context
2014-08-31
19:43
Updated to support MUSL better check-in: 4d18f784a8 user: rkeene tags: trunk
2014-07-19
06:17
More additional comments check-in: 57b7fc959d user: rkeene tags: trunk
2014-07-16
18:02
Updated comments check-in: bb7a68b1e7 user: rkeene tags: trunk
Changes

Modified tcc4tcl.tcl from [a8247de2cc] to [1d42614e04].

158
159
160
161
162
163
164

165
166
167
168
169
170
171
...
174
175
176
177
178
179
180

181
182
183
184
185
186
187
...
290
291
292
293
294
295
296

297
298
299
300
301
302
303
				set interp_name $var

				break
			}
		}

		# Create the C-style argument definition

		foreach {type var} $adefs {
			# Update definition of types
			lappend adefs_c [list $type $var]

			# Note the type for this variable
			set types($var) $type

................................................................................
				continue
			}

			# Update the list of arguments to pass to Tcl
			lappend args $var
		}


		if {[llength $adefs_c] == 0} {
			set adefs_c "void"
		} else {
			set adefs_c [join $adefs_c {, }]
		}

		# Determine actual C return type:
................................................................................
					_ccode $handle "    _$arg = $arg;"
				}
				default {
					return -code error "Unknown type: $type"
				}
			}


			if {$procname == ""} {
				_ccode $handle "    if (!Tcl_ObjSetVar2(${interp_name}, Tcl_NewStringObj(\"${arg}\", -1), NULL, _$arg, 0)) $return_failure;"
			}
		}
		_ccode $handle ""

		# Evaluate script







>







 







>







 







>







158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
...
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
...
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
				set interp_name $var

				break
			}
		}

		# Create the C-style argument definition
		## Create a list of all arguments
		foreach {type var} $adefs {
			# Update definition of types
			lappend adefs_c [list $type $var]

			# Note the type for this variable
			set types($var) $type

................................................................................
				continue
			}

			# Update the list of arguments to pass to Tcl
			lappend args $var
		}

		## Convert that list into something we can use in a C prototype
		if {[llength $adefs_c] == 0} {
			set adefs_c "void"
		} else {
			set adefs_c [join $adefs_c {, }]
		}

		# Determine actual C return type:
................................................................................
					_ccode $handle "    _$arg = $arg;"
				}
				default {
					return -code error "Unknown type: $type"
				}
			}

			# If we don't have a procedure to call, set the variables locally
			if {$procname == ""} {
				_ccode $handle "    if (!Tcl_ObjSetVar2(${interp_name}, Tcl_NewStringObj(\"${arg}\", -1), NULL, _$arg, 0)) $return_failure;"
			}
		}
		_ccode $handle ""

		# Evaluate script