diff options
author | nijtmans <nijtmans@noemail.net> | 2010-05-19 08:23:09 (GMT) |
---|---|---|
committer | nijtmans <nijtmans@noemail.net> | 2010-05-19 08:23:09 (GMT) |
commit | 30ccbb3a61d239d5cc659b31506d2dd9c4482cd7 (patch) | |
tree | 31dbdbc468a888b7db0ce1c24b08964fe129d83b /generic/tclLoad.c | |
parent | 88a2ada1ff38cf34b275595cc03cdb74aaaf0ab2 (diff) | |
download | tcl-30ccbb3a61d239d5cc659b31506d2dd9c4482cd7.zip tcl-30ccbb3a61d239d5cc659b31506d2dd9c4482cd7.tar.gz tcl-30ccbb3a61d239d5cc659b31506d2dd9c4482cd7.tar.bz2 |
Don't use arrays of length 1, just use a single element then, it makes code more readable.
FossilOrigin-Name: d3074821cb266b7709e26b7e359e40462d983613
Diffstat (limited to 'generic/tclLoad.c')
-rw-r--r-- | generic/tclLoad.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclLoad.c b/generic/tclLoad.c index 8ba90ed..22f1c86 100644 --- a/generic/tclLoad.c +++ b/generic/tclLoad.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclLoad.c,v 1.25 2010/04/02 21:21:06 kennykb Exp $ + * RCS: @(#) $Id: tclLoad.c,v 1.26 2010/05/19 08:23:09 nijtmans Exp $ */ #include "tclInt.h" @@ -129,7 +129,7 @@ Tcl_LoadObjCmd( InterpPackage *ipFirstPtr, *ipPtr; int code, namesMatch, filesMatch, offset; const char *symbols[2]; - void* procPtrs[1]; + Tcl_PackageInitProc *initProc; const char *p, *fullFileName, *packageName; Tcl_LoadHandle loadHandle; Tcl_UniChar ch; @@ -354,7 +354,7 @@ Tcl_LoadObjCmd( symbols[1] = NULL; Tcl_MutexLock(&packageMutex); - code = Tcl_LoadFile(interp, objv[1], symbols, 0, procPtrs, &loadHandle); + code = Tcl_LoadFile(interp, objv[1], symbols, 0, &initProc, &loadHandle); Tcl_MutexUnlock(&packageMutex); if (code != TCL_OK) { goto done; @@ -372,7 +372,7 @@ Tcl_LoadObjCmd( ckalloc((unsigned) (Tcl_DStringLength(&pkgName) + 1)); strcpy(pkgPtr->packageName, Tcl_DStringValue(&pkgName)); pkgPtr->loadHandle = loadHandle; - pkgPtr->initProc = (Tcl_PackageInitProc*) procPtrs[0]; + pkgPtr->initProc = initProc; pkgPtr->safeInitProc = (Tcl_PackageInitProc*) Tcl_FindSymbol(interp, loadHandle, Tcl_DStringValue(&safeInitName)); pkgPtr->unloadProc = (Tcl_PackageUnloadProc*) |