summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-31 22:23:15 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-31 22:23:15 (GMT)
commitd0613a05568e1c78a1c0f7e499a334089ec7809b (patch)
treedef1662319d2750ebfeaaf48d7f178d11e5af0e7 /generic/tclInt.h
parent4c3bb3d6ba6b55372b33667c7907ddc552582e07 (diff)
downloadtcl-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.h4
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) \