Diff

Differences From Artifact [1d0ef6f107]:

To Artifact [fc9696732b]:


    45     45   		ts->s = NULL;
    46     46   	}
    47     47   
    48     48   	ckfree((void *) ts);
    49     49   }
    50     50   
    51     51   static int Tcc4tclHandleCmd ( ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj * CONST objv[]){
    52         -	unsigned long val;
           52  +	Tcl_WideInt val;
    53     53   	void *val_p;
    54     54   	int index;
    55     55   	int res;
    56     56   	struct TclTCCState *ts;
    57     57   	TCCState *s;
    58     58   	Tcl_Obj *sym_addr;
    59     59   	static CONST char *options[] = {
................................................................................
   119    119               }
   120    120           case TCC4TCL_ADD_SYMBOL:
   121    121               if (objc != 4) {
   122    122                   Tcl_WrongNumArgs(interp, 2, objv, "symbol value");
   123    123                   return TCL_ERROR;
   124    124               }
   125    125   
   126         -            Tcl_GetLongFromObj(interp, objv[3], &val);
          126  +            if (Tcl_GetWideIntFromObj(interp, objv[3], &val) != TCL_OK) {
          127  +                return TCL_ERROR;
          128  +            }
          129  +
   127    130               val_p = (void *) val;
   128    131   
   129    132               tcc_add_symbol(s,Tcl_GetString(objv[2]), val_p); 
   130    133               return TCL_OK; 
   131    134           case TCC4TCL_COMMAND:
   132    135               if (objc != 4) {
   133    136                   Tcl_WrongNumArgs(interp, 2, objv, "tclname cname");