Differences From Artifact [a91b7e7666]:
- File generic/tclGet.c — part of check-in [af25d8dc8c] at 2013-02-04 10:51:00 on branch trunk — Eliminate all Tcl_ConvertToType calls and all direct calls to typePtr->setFromAnyProc (except the call from inside the Tcl_ConvertToType function) from the Tcl core. (user: jan.nijtmans size: 4056) [more...]
To Artifact [5aad47dbe6]:
- File generic/tclGet.c — part of check-in [271dbffaf7] at 2013-02-11 15:53:09 on branch no-register-objtypes — Still to be TIP'ed. In this branch objTypes are not registered to Tcl any more, and still can do everything. It proves that Tcl_ConvertToType and the toAnyProc in thc Tcl_ObjType struct can be safely removed. Conversion to any specific type must be done by the "Tcl_GetXXXFromObj" type functions. One objType which didn't have such a function yet: "end-offset". This branch replaces this type by an "index" objType with its own Tcl_GetIntForIndex function (which functions the same as the currently private TclGetIntForIndex, only faster...). In addition, it affects Tcl_GetBoolean, which now follows the same same parsing rules as Tcl_GetBooleanFromObj. (user: jan.nijtmans size: 3995)
| ︙ | ︙ | |||
133 134 135 136 137 138 139 |
int code;
obj.refCount = 1;
obj.bytes = (char *) src;
obj.length = strlen(src);
obj.typePtr = NULL;
| | < < < | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
int code;
obj.refCount = 1;
obj.bytes = (char *) src;
obj.length = strlen(src);
obj.typePtr = NULL;
code = Tcl_GetBooleanFromObj(interp, &obj, boolPtr);
if (obj.refCount > 1) {
Tcl_Panic("invalid sharing of Tcl_Obj on C stack");
}
return code;
}
/*
* Local Variables:
* mode: c
* c-basic-offset: 4
|
| ︙ | ︙ |