Index: tcc4tcl.tcl ================================================================== --- tcc4tcl.tcl +++ tcc4tcl.tcl @@ -336,15 +336,16 @@ ## float ## double ## char* ## Tcl_Obj* ## void* + ## Tcl_WideInt foreach x $varnames { set t $types($x) switch -- $t { - int - long - float - double - char* - Tcl_Obj* { + int - long - float - double - char* - Tcl_WideInt - Tcl_Obj* { append cbody " $types($x) _$x;" "\n" } default { append cbody " void *_$x;" "\n" } @@ -370,10 +371,14 @@ } long { append cbody " if (Tcl_GetLongFromObj(ip, objv\[$n], &_$x) != TCL_OK)" append cbody " return TCL_ERROR;" "\n" } + Tcl_WideInt { + append cbody " if (Tcl_GetWideIntFromObj(ip, objv\[$n], &_$x) != TCL_OK)" + append cbody " return TCL_ERROR;" "\n" + } float { append cbody " {" "\n" append cbody " double t;" "\n" append cbody " if (Tcl_GetDoubleFromObj(ip, objv\[$n], &t) != TCL_OK)" append cbody " return TCL_ERROR;" "\n" @@ -410,13 +415,13 @@ # char* (TCL_STATIC char*) # string (TCL_DYNAMIC char*) # dstring (TCL_DYNAMIC char*) # vstring (TCL_VOLATILE char*) # default (Tcl_Obj*) - # wide + # Tcl_WideInt switch -- $rtype { - void - ok - int - long - float - double - wide {} + void - ok - int - long - float - double - Tcl_WideInt {} default { append cbody " if (rv == NULL) {\n" append cbody " return(TCL_ERROR);\n" append cbody " }\n" } @@ -425,10 +430,11 @@ switch -- $rtype { void { } ok { append cbody " return rv;" "\n" } int { append cbody " Tcl_SetIntObj(Tcl_GetObjResult(ip), rv);" "\n" } long { append cbody " Tcl_SetLongObj(Tcl_GetObjResult(ip), rv);" "\n" } + Tcl_WideInt { append cbody " Tcl_SetWideIntObj(Tcl_GetObjResult(ip), rv);" "\n" } float - double { append cbody " Tcl_SetDoubleObj(Tcl_GetObjResult(ip), rv);" "\n" } char* { append cbody " Tcl_SetResult(ip, rv, TCL_STATIC);" "\n" } string - dstring { append cbody " Tcl_SetResult(ip, rv, TCL_DYNAMIC);" "\n" }