summaryrefslogtreecommitdiffstats
path: root/generic/tclTestObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-21 12:57:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-21 12:57:21 (GMT)
commit3fd7f1aa143d5095721daf36be1497966e1fae79 (patch)
tree9014214209e8dfdc937f9d44b2cd8857c988f961 /generic/tclTestObj.c
parentcbce4bcf9f419d300baf4ff553be97adc49702fb (diff)
downloadtcl-3fd7f1aa143d5095721daf36be1497966e1fae79.zip
tcl-3fd7f1aa143d5095721daf36be1497966e1fae79.tar.gz
tcl-3fd7f1aa143d5095721daf36be1497966e1fae79.tar.bz2
Formatting/indenting
Diffstat (limited to 'generic/tclTestObj.c')
-rw-r--r--generic/tclTestObj.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index 9f31cff..8a9dc7b 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.c
@@ -13,6 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
+
#undef BUILD_tcl
#ifndef USE_TCL_STUBS
# define USE_TCL_STUBS
@@ -54,17 +55,24 @@ static Tcl_ObjCmdProc TeststringobjCmd;
#define VARPTR_KEY "TCLOBJTEST_VARPTR"
#define NUMBER_OF_OBJECT_VARS 20
-static void VarPtrDeleteProc(void *clientData, TCL_UNUSED(Tcl_Interp *))
+static void
+VarPtrDeleteProc(
+ void *clientData,
+ TCL_UNUSED(Tcl_Interp *))
{
int i;
Tcl_Obj **varPtr = (Tcl_Obj **) clientData;
for (i = 0; i < NUMBER_OF_OBJECT_VARS; i++) {
- if (varPtr[i]) Tcl_DecrRefCount(varPtr[i]);
+ if (varPtr[i]) {
+ Tcl_DecrRefCount(varPtr[i]);
+ }
}
ckfree(varPtr);
}
-static Tcl_Obj **GetVarPtr(Tcl_Interp *interp)
+static Tcl_Obj **
+GetVarPtr(
+ Tcl_Interp *interp)
{
Tcl_InterpDeleteProc *proc;
@@ -408,7 +416,7 @@ TestbooleanobjCmd(
return TCL_ERROR;
}
if (Tcl_GetBooleanFromObj(interp, varPtr[varIndex],
- &boolValue) != TCL_OK) {
+ &boolValue) != TCL_OK) {
return TCL_ERROR;
}
if (!Tcl_IsShared(varPtr[varIndex])) {
@@ -508,7 +516,7 @@ TestdoubleobjCmd(
return TCL_ERROR;
}
if (Tcl_GetDoubleFromObj(interp, varPtr[varIndex],
- &doubleValue) != TCL_OK) {
+ &doubleValue) != TCL_OK) {
return TCL_ERROR;
}
if (!Tcl_IsShared(varPtr[varIndex])) {
@@ -947,7 +955,7 @@ TestlistobjCmd(
case LISTOBJ_REPLACE:
if (objc < 5) {
Tcl_WrongNumArgs(interp, 2, objv,
- "varIndex start count ?element...?");
+ "varIndex start count ?element...?");
return TCL_ERROR;
}
if (Tcl_GetIntForIndex(interp, objv[3], TCL_INDEX_NONE, &first) != TCL_OK
@@ -959,7 +967,7 @@ TestlistobjCmd(
}
Tcl_ResetResult(interp);
return Tcl_ListObjReplace(interp, varPtr[varIndex], first, count,
- objc-5, objv+5);
+ objc-5, objv+5);
case LISTOBJ_INDEXMEMCHECK:
if (objc != 3) {
@@ -1016,8 +1024,7 @@ TestlistobjCmd(
* Hence this explicit test.
*/
if (objc != 4) {
- Tcl_WrongNumArgs(interp, 2, objv,
- "varIndex listIndex");
+ Tcl_WrongNumArgs(interp, 2, objv, "varIndex listIndex");
return TCL_ERROR;
}
if (Tcl_GetIntForIndex(interp, objv[3], TCL_INDEX_NONE, &first) != TCL_OK) {