chiark / gitweb /
125dd61eb9e182a2fbfd36f46ac824f38a9f006e
[chiark-tcl.git] / hbytes / parse.c
1   sc= enum_lookup_cached(ip,objv[1],subcommands,"hbytes subcommand");
2
3
4 static Tcl_Obj *hb_getvar(Tcl_Interp *ip, Tcl_Obj *varname) {
5   int ec;
6   Tcl_Obj *value;
7   
8   value= Tcl_ObjGetVar2(ip,varname,0,TCL_LEAVE_ERR_MSG);
9   if (!value) return 0;
10
11   ec= Tcl_ConvertToType(ip,value,&hbytes_type);
12   if (ec) return 0;
13
14   return value;
15 }
16