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    158   				set interp_name $var
   159    159   
   160    160   				break
   161    161   			}
   162    162   		}
   163    163   
   164    164   		# Create the C-style argument definition
          165  +		## Create a list of all arguments
   165    166   		foreach {type var} $adefs {
   166    167   			# Update definition of types
   167    168   			lappend adefs_c [list $type $var]
   168    169   
   169    170   			# Note the type for this variable
   170    171   			set types($var) $type
   171    172   
................................................................................
   174    175   				continue
   175    176   			}
   176    177   
   177    178   			# Update the list of arguments to pass to Tcl
   178    179   			lappend args $var
   179    180   		}
   180    181   
          182  +		## Convert that list into something we can use in a C prototype
   181    183   		if {[llength $adefs_c] == 0} {
   182    184   			set adefs_c "void"
   183    185   		} else {
   184    186   			set adefs_c [join $adefs_c {, }]
   185    187   		}
   186    188   
   187    189   		# Determine actual C return type:
................................................................................
   290    292   					_ccode $handle "    _$arg = $arg;"
   291    293   				}
   292    294   				default {
   293    295   					return -code error "Unknown type: $type"
   294    296   				}
   295    297   			}
   296    298   
          299  +			# If we don't have a procedure to call, set the variables locally
   297    300   			if {$procname == ""} {
   298    301   				_ccode $handle "    if (!Tcl_ObjSetVar2(${interp_name}, Tcl_NewStringObj(\"${arg}\", -1), NULL, _$arg, 0)) $return_failure;"
   299    302   			}
   300    303   		}
   301    304   		_ccode $handle ""
   302    305   
   303    306   		# Evaluate script