Check-in [91b1a5ba3d]
Overview
Comment:Added support for a ClientData type
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 91b1a5ba3dc85777c5e7ffe958775b721a54ec73
User & Date: rkeene on 2016-01-25 18:31:00
Other Links: manifest | tags
Context
2016-01-25
18:31
Added support for additional ways of representing the x86_64 machine name check-in: 9a09044c1d user: rkeene tags: trunk
18:31
Added support for a ClientData type check-in: 91b1a5ba3d user: rkeene tags: trunk
18:18
Added support for a ClientData type check-in: 633a01c5d6 user: rkeene tags: trunk
Changes

Modified tcc4tcl.tcl from [779467e01e] to [f1fd06e875].

   586    586   	set varnames {}
   587    587   	set cargs {}
   588    588   	set cnames {}  
   589    589   	set cbody {}
   590    590   	set code {}
   591    591   
   592    592   	# Write wrapper
   593         -	append cbody "int $wname\(ClientData dummy, Tcl_Interp *ip, int objc, Tcl_Obj *CONST objv\[\]) {" "\n"
          593  +	append cbody "int $wname\(ClientData clientdata, Tcl_Interp *ip, int objc, Tcl_Obj *CONST objv\[\]) {" "\n"
   594    594   
   595    595   	# if first arg is "Tcl_Interp*", pass it without counting it as a cmd arg
   596         -	if {[lindex $adefs 0] eq "Tcl_Interp*"} {
   597         -		lappend cnames ip
   598         -		lappend cargs [lrange $adefs 0 1]
   599         -		set adefs [lrange $adefs 2 end]
          596  +	while {1} {
          597  +		if {[lindex $adefs 0] eq "Tcl_Interp*"} {
          598  +			lappend cnames ip
          599  +			lappend cargs [lrange $adefs 0 1]
          600  +			set adefs [lrange $adefs 2 end]
          601  +
          602  +			continue
          603  +		}
          604  +
          605  +		if {[lindex $adefs 0] eq "ClientData"} {
          606  +			lappend cnames clientdata
          607  +			lappend cargs [lrange $adefs 0 1]
          608  +			set adefs [lrange $adefs 2 end]
          609  +
          610  +			continue
          611  +		}
          612  +
          613  +		break
   600    614   	}
   601    615   
   602    616   	foreach {t n} $adefs {
   603    617   		set types($n) $t
   604    618   		lappend varnames $n
   605    619   		lappend cnames _$n
   606    620   		lappend cargs "$t $n"
................................................................................
   637    651   			append code "$rtype2 ${cname}($cargs_str);\n"
   638    652   		}
   639    653   	}
   640    654   
   641    655   	# Create wrapper function
   642    656   	## Supported input types
   643    657   	##   Tcl_Interp*
          658  +	##   ClientData
   644    659   	##   int
   645    660   	##   long
   646    661   	##   float
   647    662   	##   double
   648    663   	##   char*
   649    664   	##   Tcl_Obj*
   650    665   	##   void*