diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-01-31 22:23:15 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-01-31 22:23:15 (GMT) |
| commit | d0613a05568e1c78a1c0f7e499a334089ec7809b (patch) | |
| tree | def1662319d2750ebfeaaf48d7f178d11e5af0e7 /generic/tclInt.h | |
| parent | 4c3bb3d6ba6b55372b33667c7907ddc552582e07 (diff) | |
| download | tcl-d0613a05568e1c78a1c0f7e499a334089ec7809b.zip tcl-d0613a05568e1c78a1c0f7e499a334089ec7809b.tar.gz tcl-d0613a05568e1c78a1c0f7e499a334089ec7809b.tar.bz2 | |
Make TclIsPureByteArray() a macro, since it's only doing a single compare. Other internal simplifications/code duplication. No functional change, only optimizations
Diffstat (limited to 'generic/tclInt.h')
| -rw-r--r-- | generic/tclInt.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index b220a31..c3989fd 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2749,6 +2749,7 @@ MODULE_SCOPE ClientData tclTimeClientData; MODULE_SCOPE const Tcl_ObjType tclBignumType; MODULE_SCOPE const Tcl_ObjType tclBooleanType; MODULE_SCOPE const Tcl_ObjType tclByteArrayType; +MODULE_SCOPE const Tcl_ObjType tclPureByteArrayType; MODULE_SCOPE const Tcl_ObjType tclByteCodeType; MODULE_SCOPE const Tcl_ObjType tclDoubleType; MODULE_SCOPE const Tcl_ObjType tclIntType; @@ -4621,7 +4622,8 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file, *---------------------------------------------------------------- */ -MODULE_SCOPE int TclIsPureByteArray(Tcl_Obj *objPtr); +#define TclIsPureByteArray(objPtr) \ + ((objPtr)->typePtr==&tclPureByteArrayType) #define TclIsPureDict(objPtr) \ (((objPtr)->bytes==NULL) && ((objPtr)->typePtr==&tclDictType)) #define TclFetchIntRep(objPtr, type) \ |
