Check-in [6deb0e2500]
Overview
Comment:Updated to get pointers from Tcl using Tcl_GetWideIntFromObj()
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6deb0e2500e0e48d009bff3e053a285380f73ded
User & Date: rkeene on 2014-06-22 17:31:30
Other Links: manifest | tags
Context
2014-06-22
18:05
Updated to process string through expr(wide()) to format them correctly check-in: fc293f04c4 user: rkeene tags: trunk
17:31
Updated to get pointers from Tcl using Tcl_GetWideIntFromObj() check-in: 6deb0e2500 user: rkeene tags: trunk
2014-06-21
21:44
Updated to use "source" instead of "." to source a file, for really old shells check-in: 8615f936d3 user: rkeene tags: trunk
Changes

Modified tcc4tcl.c from [1d0ef6f107] to [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");