@@ -209,11 +209,11 @@ res = CMAC_Init(statePtr->cctx, key, (int) key_len, cipher, NULL); break; } if (!res) { - Tcl_AppendResult(interp, "Initialize failed: ", REASON(), (char *) NULL); + Tcl_AppendResult(interp, "Initialize failed: ", GET_ERR_REASON(), (char *) NULL); return TCL_ERROR; } return TCL_OK; } @@ -249,11 +249,11 @@ res = CMAC_Update(statePtr->cctx, buf, (size_t) read); break; } if (!res && do_result) { - Tcl_AppendResult(statePtr->interp, "Update failed: ", REASON(), (char *) NULL); + Tcl_AppendResult(statePtr->interp, "Update failed: ", GET_ERR_REASON(), (char *) NULL); return TCL_ERROR; } return TCL_OK; } @@ -302,11 +302,11 @@ break; } if (!res) { if (resultObj == NULL) { - Tcl_AppendResult(interp, "Finalize failed: ", REASON(), (char *) NULL); + Tcl_AppendResult(interp, "Finalize failed: ", GET_ERR_REASON(), (char *) NULL); } return TCL_ERROR; } /* Return message digest as either a binary or hex string */ @@ -457,11 +457,11 @@ /* Update hash function */ if (read > 0) { /* Have data */ if (DigestUpdate(statePtr, buf, read, 0) != TCL_OK) { - Tcl_SetChannelError(statePtr->self, Tcl_ObjPrintf("Update failed: %s", REASON())); + Tcl_SetChannelError(statePtr->self, Tcl_ObjPrintf("Update failed: %s", GET_ERR_REASON())); *errorCodePtr = EINVAL; return 0; } /* This is correct */ read = -1; @@ -478,11 +478,11 @@ unsigned char *data = Tcl_GetByteArrayFromObj(resultObj, &read); memcpy(buf, data, (int) read); Tcl_DecrRefCount(resultObj); } else { - Tcl_SetChannelError(statePtr->self, Tcl_ObjPrintf("Finalize failed: %s", REASON())); + Tcl_SetChannelError(statePtr->self, Tcl_ObjPrintf("Finalize failed: %s", GET_ERR_REASON())); *errorCodePtr = EINVAL; read = 0; } statePtr->flags |= CHAN_EOF; } @@ -515,11 +515,11 @@ return 0; } /* Update hash function */ if (DigestUpdate(statePtr, buf, (Tcl_Size) toWrite, 0) != TCL_OK) { - Tcl_SetChannelError(statePtr->self, Tcl_ObjPrintf("Update failed: %s", REASON())); + Tcl_SetChannelError(statePtr->self, Tcl_ObjPrintf("Update failed: %s", GET_ERR_REASON())); *errorCodePtr = EINVAL; return 0; } return toWrite; }