diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2007-11-15 16:21:02 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2007-11-15 16:21:02 (GMT) |
commit | c5cbfc795cc50cd0ec76faa503f77344fb69a94a (patch) | |
tree | af7ddc3cbc02b69328a40b0679b15815fed2b3c8 /generic/tclNamesp.c | |
parent | a2c39eef55596583301ced9356ec03e35a6783f0 (diff) | |
download | tcl-c5cbfc795cc50cd0ec76faa503f77344fb69a94a.zip tcl-c5cbfc795cc50cd0ec76faa503f77344fb69a94a.tar.gz tcl-c5cbfc795cc50cd0ec76faa503f77344fb69a94a.tar.bz2 |
Must pass non-NULL interp to Tcl_SetEnsemble* functions.
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r-- | generic/tclNamesp.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index df5fb56..5c6582d 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -23,7 +23,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.153 2007/11/14 23:05:03 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.154 2007/11/15 16:21:04 dkf Exp $ */ #include "tclInt.h" @@ -5200,10 +5200,10 @@ NamespaceEnsembleCmd( flags = (permitPrefix ? flags|TCL_ENSEMBLE_PREFIX : flags&~TCL_ENSEMBLE_PREFIX); - Tcl_SetEnsembleSubcommandList(NULL, token, subcmdObj); - Tcl_SetEnsembleMappingDict(NULL, token, mapObj); - Tcl_SetEnsembleUnknownHandler(NULL, token, unknownObj); - Tcl_SetEnsembleFlags(NULL, token, flags); + Tcl_SetEnsembleSubcommandList(interp, token, subcmdObj); + Tcl_SetEnsembleMappingDict(interp, token, mapObj); + Tcl_SetEnsembleUnknownHandler(interp, token, unknownObj); + Tcl_SetEnsembleFlags(interp, token, flags); return TCL_OK; } @@ -5318,13 +5318,12 @@ Tcl_SetEnsembleSubcommandList( Tcl_Obj *oldList; if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - if (interp != NULL) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - } + Tcl_AppendResult(interp, "command is not an ensemble", NULL); return TCL_ERROR; } if (subcmdList != NULL) { int length; + if (TclListObjLength(interp, subcmdList, &length) != TCL_OK) { return TCL_ERROR; } @@ -5395,13 +5394,12 @@ Tcl_SetEnsembleMappingDict( Tcl_Obj *oldDict; if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - if (interp != NULL) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - } + Tcl_AppendResult(interp, "command is not an ensemble", NULL); return TCL_ERROR; } if (mapDict != NULL) { int size; + if (Tcl_DictObjSize(interp, mapDict, &size) != TCL_OK) { return TCL_ERROR; } @@ -5472,9 +5470,7 @@ Tcl_SetEnsembleUnknownHandler( Tcl_Obj *oldList; if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - if (interp != NULL) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - } + Tcl_AppendResult(interp, "command is not an ensemble", NULL); return TCL_ERROR; } if (unknownList != NULL) { @@ -5537,9 +5533,7 @@ Tcl_SetEnsembleFlags( EnsembleConfig *ensemblePtr; if (cmdPtr->objProc != NsEnsembleImplementationCmd) { - if (interp != NULL) { - Tcl_AppendResult(interp, "command is not an ensemble", NULL); - } + Tcl_AppendResult(interp, "command is not an ensemble", NULL); return TCL_ERROR; } |