Index: generic/gentclAPI.tcl =================================================================== diff -u -r04747ba752ca2b7a4f30586348e39ab04f190da9 -rfcf06c1f38122e0058d3092a3efa9f01d1e7ce04 --- generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision 04747ba752ca2b7a4f30586348e39ab04f190da9) +++ generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision fcf06c1f38122e0058d3092a3efa9f01d1e7ce04) @@ -29,7 +29,7 @@ int index, result; $opts result = Tcl_GetIndexFromObj(interp, objPtr, opts, "$argname", 0, &index); - *clientData = (ClientData) index + 1; + *clientData = (ClientData) INT2PTR(index + 1); return result; } enum ${name}Idx {[join $enums {, }]}; @@ -172,7 +172,13 @@ } } if {!$ifSet} {lappend if "$type$varName"} - if {$cVar} {lappend c [subst -nocommands {$type$varName = ($type)pc.clientData[$i];}]} + if {$cVar} { + if {$type eq "int "} { + lappend c [subst -nocommands {$type$varName = ($type)PTR2INT(pc.clientData[$i]);}] + } else { + lappend c [subst -nocommands {$type$varName = ($type)pc.clientData[$i];}] + } + } lappend a $calledArg incr i }