summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-02-04 22:46:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-02-04 22:46:56 (GMT)
commitd50da922b1c1a3043e6ee9f24282a638ee143b48 (patch)
tree937d8b4d10f30a85b1657a2af519b72b243bd63e /generic/tclObj.c
parent795fcf4f08882df1123a1ab6228a6cdf31fbb3eb (diff)
parent73b6b4eab6a4b0a4ecf0f0c6bcf00bd815c34dd5 (diff)
downloadtcl-d50da922b1c1a3043e6ee9f24282a638ee143b48.zip
tcl-d50da922b1c1a3043e6ee9f24282a638ee143b48.tar.gz
tcl-d50da922b1c1a3043e6ee9f24282a638ee143b48.tar.bz2
merge 8.7
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 9edb75f..3385c0d 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -178,7 +178,7 @@ static Tcl_ThreadDataKey pendingObjDataKey;
#define PACK_BIGNUM(bignum, objPtr) \
if ((bignum).used > 0x7fff) { \
- mp_int *temp = (void *) ckalloc((unsigned) sizeof(mp_int)); \
+ mp_int *temp = (void *) ckalloc(sizeof(mp_int)); \
*temp = bignum; \
(objPtr)->internalRep.twoPtrValue.ptr1 = temp; \
(objPtr)->internalRep.twoPtrValue.ptr2 = INT2PTR(-1); \
@@ -1730,15 +1730,15 @@ Tcl_GetStringFromObj(
* This function is called in several configurations to provide all
* the tools needed to set an object's string representation. The
* function is determined by the arguments.
- *
+ *
* (objPtr->bytes != NULL && bytes != NULL) || (numBytes < 0)
* Invalid call -- panic!
- *
+ *
* objPtr->bytes == NULL && bytes == NULL && numBytes >= 0
* Allocation only - allocate space for (numBytes+1) chars.
* store in objPtr->bytes and return. Also sets
* objPtr->length to 0 and objPtr->bytes[0] to NUL.
- *
+ *
* objPtr->bytes == NULL && bytes != NULL && numBytes >= 0
* Allocate and copy. bytes is assumed to point to chars to
* copy into the string rep. objPtr->length = numBytes. Allocate
@@ -1917,13 +1917,7 @@ Tcl_FetchIntRep(
Tcl_Obj *objPtr, /* Object to fetch from. */
const Tcl_ObjType *typePtr) /* Requested type */
{
- /* If objPtr type doesn't match request, nothing can be fetched */
- if (objPtr->typePtr != typePtr) {
- return NULL;
- }
-
- /* Type match! objPtr IntRep is the one sought. */
- return &(objPtr->internalRep);
+ return TclFetchIntRep(objPtr, typePtr);
}
/*
@@ -1980,7 +1974,7 @@ Tcl_Obj *
Tcl_NewBooleanObj(
register int boolValue) /* Boolean used to initialize new object. */
{
- return Tcl_DbNewLongObj(boolValue!=0, "unknown", 0);
+ return Tcl_DbNewWideIntObj(boolValue!=0, "unknown", 0);
}
#else /* if not TCL_MEM_DEBUG */
@@ -2623,6 +2617,7 @@ UpdateStringOfDouble(
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
#undef Tcl_NewIntObj
#ifdef TCL_MEM_DEBUG
@@ -2630,7 +2625,7 @@ Tcl_Obj *
Tcl_NewIntObj(
register int intValue) /* Int used to initialize the new object. */
{
- return Tcl_DbNewLongObj((long)intValue, "unknown", 0);
+ return Tcl_DbNewWideIntObj((long)intValue, "unknown", 0);
}
#else /* if not TCL_MEM_DEBUG */
@@ -2645,6 +2640,7 @@ Tcl_NewIntObj(
return objPtr;
}
#endif /* if TCL_MEM_DEBUG */
+#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
@@ -2830,6 +2826,7 @@ UpdateStringOfOldInt(
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
#undef Tcl_NewLongObj
#ifdef TCL_MEM_DEBUG
@@ -2838,7 +2835,7 @@ Tcl_NewLongObj(
register long longValue) /* Long integer used to initialize the
* new object. */
{
- return Tcl_DbNewLongObj(longValue, "unknown", 0);
+ return Tcl_DbNewWideIntObj(longValue, "unknown", 0);
}
#else /* if not TCL_MEM_DEBUG */
@@ -2854,6 +2851,7 @@ Tcl_NewLongObj(
return objPtr;
}
#endif /* if TCL_MEM_DEBUG */
+#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
@@ -2887,6 +2885,7 @@ Tcl_NewLongObj(
*----------------------------------------------------------------------
*/
+#ifndef TCL_NO_DEPRECATED
#undef Tcl_DbNewLongObj
#ifdef TCL_MEM_DEBUG
@@ -2921,9 +2920,10 @@ Tcl_DbNewLongObj(
int line) /* Line number in the source file; used for
* debugging. */
{
- return Tcl_NewLongObj(longValue);
+ return Tcl_NewWideIntObj(longValue);
}
#endif /* TCL_MEM_DEBUG */
+#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------