Index: TODO =================================================================== diff -u -r6c9eb2ec861ed79b5dedf32abe2ea26059168215 -r6c7bb9ba109a65cf8b80fbe947268522dc528ebe --- TODO (.../TODO) (revision 6c9eb2ec861ed79b5dedf32abe2ea26059168215) +++ TODO (.../TODO) (revision 6c7bb9ba109a65cf8b80fbe947268522dc528ebe) @@ -5553,6 +5553,10 @@ - regenerate documentation - bump verison number to 2.0.0 (also in .man files) +- write body-blocks of if on separate lines +- change variable name "validCscPtr" to "isValidCsc", since + it is a boolean and not a ptr (tcl coding guidelines) + ======================================================================== TODO: Index: generic/nsf.c =================================================================== diff -u -r4e2b21c0e31e71a1ca265c705190c4e869b266ec -r6c7bb9ba109a65cf8b80fbe947268522dc528ebe --- generic/nsf.c (.../nsf.c) (revision 4e2b21c0e31e71a1ca265c705190c4e869b266ec) +++ generic/nsf.c (.../nsf.c) (revision 6c7bb9ba109a65cf8b80fbe947268522dc528ebe) @@ -3410,7 +3410,9 @@ * final methodName, */ cmd = Tcl_GetCommandFromObj(interp, methodHandleObj); - if (methodNameDs != NULL && methodName1 != NULL) {*methodName1 = Tcl_DStringValue(methodNameDs);} + if (methodNameDs != NULL && methodName1 != NULL) { + *methodName1 = Tcl_DStringValue(methodNameDs); + } /*fprintf(stderr, "... methodname1 '%s' cmd %p\n", Tcl_DStringValue(methodNameDs), cmd);*/ DECR_REF_COUNT(methodHandleObj); @@ -12959,7 +12961,7 @@ Tcl_Command cmd, NsfObject *object, NsfClass *cl, const char *methodName, int frameType, unsigned int flags) { NsfCallStackContent csc, *cscPtr; - int result, validCscPtr = 1; + int result, isValidCsc = 1; Tcl_Command resolvedCmd; assert(clientData != NULL); @@ -12995,10 +12997,10 @@ CscInit(cscPtr, object, cl, cmd, frameType, flags, methodName); result = MethodDispatchCsc(object, interp, objc, objv, - resolvedCmd, cscPtr, methodName, &validCscPtr); + resolvedCmd, cscPtr, methodName, &isValidCsc); #if defined(NRE) - if (validCscPtr) { + if (isValidCsc == 1) { CscListRemove(interp, cscPtr, NULL); CscFinish(interp, cscPtr, result, "csc cleanup"); } @@ -13170,7 +13172,7 @@ Tcl_Command cmd = NULL; Tcl_Obj *cmdName = object->cmdName, *methodObj; NsfCallStackContent csc, *cscPtr = NULL; - int validCscPtr = 1; + int isValidCsc = 1; NsfRuntimeState *rst = RUNTIME_STATE(interp); assert(interp != NULL); @@ -13362,7 +13364,7 @@ if (unlikely(result != TCL_OK)) { /*fprintf(stderr, "mixinsearch returned an error for %p %s.%s\n", object, ObjectName(object), methodName);*/ - validCscPtr = 0; + isValidCsc = 0; goto exit_object_dispatch; } if (cmd1 != NULL) { @@ -13544,7 +13546,7 @@ */ Tcl_Command resolvedCmd = AliasDereference(interp, object, methodName, cmd); if (unlikely(resolvedCmd == NULL)) { - validCscPtr = 0; + isValidCsc = 0; goto exit_object_dispatch; } @@ -13573,7 +13575,7 @@ cscPtr);*/ result = MethodDispatchCsc(clientData, interp, objc-shift, objv+shift, - resolvedCmd, cscPtr, methodName, &validCscPtr); + resolvedCmd, cscPtr, methodName, &isValidCsc); if (unlikely(result == TCL_ERROR)) { /*fprintf(stderr, "Call ErrInProc cl = %p, cmd %p, methodName %s flags %.6x\n", @@ -13598,7 +13600,7 @@ } exit_object_dispatch: - if (likely(validCscPtr)) { + if (likely(isValidCsc == 1)) { /* * In every situation, we have a cscPtr containing all context information */ @@ -22278,7 +22280,7 @@ } case InfomethodsubcmdExistsIdx: { - Tcl_SetObjResult(interp, Tcl_NewIntObj(!CmdIsNsfObject(cmd))); + Tcl_SetObjResult(interp, Tcl_NewIntObj(CmdIsNsfObject(cmd) == 0)); return TCL_OK; } case InfomethodsubcmdArgsIdx: Index: generic/nsfInt.h =================================================================== diff -u -r6c58e11484577ddb20135d823c0ebfdce6d9dba3 -r6c7bb9ba109a65cf8b80fbe947268522dc528ebe --- generic/nsfInt.h (.../nsfInt.h) (revision 6c58e11484577ddb20135d823c0ebfdce6d9dba3) +++ generic/nsfInt.h (.../nsfInt.h) (revision 6c7bb9ba109a65cf8b80fbe947268522dc528ebe) @@ -608,7 +608,7 @@ } NsfProcClientData; typedef enum SystemMethodsIdx { - NSF_c_alloc_idx, + NSF_c_alloc_idx, NSF_c_create_idx, NSF_c_dealloc_idx, NSF_c_configureparameter_idx, @@ -618,8 +618,8 @@ NSF_o_configureparameter_idx, NSF_o_defaultmethod_idx, NSF_o_destroy_idx, - NSF_o_init_idx, - NSF_o_move_idx, + NSF_o_init_idx, + NSF_o_move_idx, NSF_o_unknown_idx, NSF_s_get_idx, NSF_s_set_idx