You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tcl.apache.org by mx...@apache.org on 2022/02/14 16:33:58 UTC
[tcl-rivet] 01/02: merge master changes
This is an automated email from the ASF dual-hosted git repository.
mxmanghi pushed a commit to branch quattuor
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git
commit 9a0a2aea05019bd55f11a5054c15bb0ba106745b
Author: Massimo Manghi <ma...@gmail.com>
AuthorDate: Sun Feb 13 16:14:11 2022 +0100
merge master changes
---
src/mod_rivet_ng/rivetCore.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/mod_rivet_ng/rivetCore.c b/src/mod_rivet_ng/rivetCore.c
index 3ed9d21..32bdc3b 100644
--- a/src/mod_rivet_ng/rivetCore.c
+++ b/src/mod_rivet_ng/rivetCore.c
@@ -743,7 +743,7 @@ TCL_CMD_HEADER ( Rivet_Var )
if (TclWeb_GetVarAsList(result, key, source, private->req) != TCL_OK)
{
- result = Tcl_NewStringObj("", -1);
+ Tcl_SetStringObj(result,"",-1);
}
} else if(!strcmp(command, "names")) {
if (objc != 2)
@@ -754,7 +754,7 @@ TCL_CMD_HEADER ( Rivet_Var )
if (TclWeb_GetVarNames(result, source, private->req) != TCL_OK)
{
- result = Tcl_NewStringObj("", -1);
+ Tcl_SetStringObj(result,"", -1);
}
} else if(!strcmp(command, "number")) {
if (objc != 2)
@@ -770,14 +770,15 @@ TCL_CMD_HEADER ( Rivet_Var )
Tcl_WrongNumArgs(interp, 2, objv, NULL);
return TCL_ERROR;
}
+
if (TclWeb_GetAllVars(result, source, private->req) != TCL_OK)
{
- result = Tcl_NewStringObj("", -1);
+ Tcl_SetStringObj(result,"", -1);
}
} else {
/* bad command */
- Tcl_AppendResult(interp, "bad option: must be one of ",
- "'get, list, names, number, all'", NULL);
+ Tcl_AppendResult(interp,"bad option: must be one of ",
+ "'get, list, names, number, all'", NULL);
return TCL_ERROR;
}
Tcl_SetObjResult(interp, result);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org