summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-12-19 09:33:16 (GMT)
committernijtmans <nijtmans>2008-12-19 09:33:16 (GMT)
commitf2070308a370f83bf12bcd7d309a3a52bbe5a6d7 (patch)
treed0e0145be9103e6fd2370b867ebdc86c0439f8f7 /generic
parentfae92e13aa67786689aca359e3454837d43358b8 (diff)
downloadtcl-f2070308a370f83bf12bcd7d309a3a52bbe5a6d7.zip
tcl-f2070308a370f83bf12bcd7d309a3a52bbe5a6d7.tar.gz
tcl-f2070308a370f83bf12bcd7d309a3a52bbe5a6d7.tar.bz2
CONSTify TclGetLoadedPackages second param
Diffstat (limited to 'generic')
-rw-r--r--generic/tclInt.decls4
-rw-r--r--generic/tclIntDecls.h6
-rw-r--r--generic/tclLoad.c20
3 files changed, 15 insertions, 15 deletions
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index b413a4a..433ba9b 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -13,7 +13,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tclInt.decls,v 1.134 2008/12/18 06:40:02 nijtmans Exp $
+# RCS: @(#) $Id: tclInt.decls,v 1.135 2008/12/19 09:33:16 nijtmans Exp $
library tcl
@@ -168,7 +168,7 @@ declare 34 generic {
# int TclGetLong(Tcl_Interp *interp, const char *str, long *longPtr)
#}
declare 37 generic {
- int TclGetLoadedPackages(Tcl_Interp *interp, char *targetName)
+ int TclGetLoadedPackages(Tcl_Interp *interp, const char *targetName)
}
declare 38 generic {
int TclGetNamespaceForQualName(Tcl_Interp *interp, const char *qualName,
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index b4adc16..1057bda 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIntDecls.h,v 1.129 2008/12/18 06:40:02 nijtmans Exp $
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.130 2008/12/19 09:33:16 nijtmans Exp $
*/
#ifndef _TCLINTDECLS
@@ -217,7 +217,7 @@ EXTERN int TclGetIntForIndex (Tcl_Interp * interp,
#define TclGetLoadedPackages_TCL_DECLARED
/* 37 */
EXTERN int TclGetLoadedPackages (Tcl_Interp * interp,
- char * targetName);
+ const char * targetName);
#endif
#ifndef TclGetNamespaceForQualName_TCL_DECLARED
#define TclGetNamespaceForQualName_TCL_DECLARED
@@ -1140,7 +1140,7 @@ typedef struct TclIntStubs {
int (*tclGetIntForIndex) (Tcl_Interp * interp, Tcl_Obj * objPtr, int endValue, int * indexPtr); /* 34 */
void *reserved35;
void *reserved36;
- int (*tclGetLoadedPackages) (Tcl_Interp * interp, char * targetName); /* 37 */
+ int (*tclGetLoadedPackages) (Tcl_Interp * interp, const char * targetName); /* 37 */
int (*tclGetNamespaceForQualName) (Tcl_Interp * interp, const char * qualName, Namespace * cxtNsPtr, int flags, Namespace ** nsPtrPtr, Namespace ** altNsPtrPtr, Namespace ** actualCxtPtrPtr, const char ** simpleNamePtr); /* 38 */
TclObjCmdProcType (*tclGetObjInterpProc) (void); /* 39 */
int (*tclGetOpenMode) (Tcl_Interp * interp, const char * str, int * seekFlagPtr); /* 40 */
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 0f64137..e5b70c3 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.22 2008/12/05 14:27:36 dkf Exp $
+ * RCS: @(#) $Id: tclLoad.c,v 1.23 2008/12/19 09:33:16 nijtmans Exp $
*/
#include "tclInt.h"
@@ -137,7 +137,7 @@ Tcl_LoadObjCmd(
const char *symbols[4];
Tcl_PackageInitProc **procPtrs[4];
ClientData clientData;
- char *p, *fullFileName, *packageName;
+ const char *p, *fullFileName, *packageName;
Tcl_LoadHandle loadHandle;
Tcl_FSUnloadFileProc *unLoadProcPtr = NULL;
Tcl_UniChar ch;
@@ -179,7 +179,7 @@ Tcl_LoadObjCmd(
target = interp;
if (objc == 4) {
- char *slaveIntName = Tcl_GetString(objv[3]);
+ const char *slaveIntName = Tcl_GetString(objv[3]);
target = Tcl_GetSlave(interp, slaveIntName);
if (target == NULL) {
@@ -292,7 +292,7 @@ Tcl_LoadObjCmd(
Tcl_Obj *splitPtr;
Tcl_Obj *pkgGuessPtr;
int pElements;
- char *pkgGuess;
+ const char *pkgGuess;
/*
* The platform-specific code couldn't figure out the module
@@ -505,7 +505,7 @@ Tcl_UnloadObjCmd(
int i, index, code, complain = 1, keepLibrary = 0;
int trustedRefCount = -1, safeRefCount = -1;
const char *fullFileName = "";
- char *packageName;
+ const char *packageName;
static const char *const options[] = {
"-nocomplain", "-keeplibrary", "--", NULL
};
@@ -581,7 +581,7 @@ Tcl_UnloadObjCmd(
target = interp;
if (objc - i == 3) {
- char *slaveIntName = Tcl_GetString(objv[i + 2]);
+ const char *slaveIntName = Tcl_GetString(objv[i + 2]);
target = Tcl_GetSlave(interp, slaveIntName);
if (target == NULL) {
@@ -872,8 +872,8 @@ Tcl_UnloadObjCmd(
* Our result is the two reference counts.
*/
- objPtr[0] = Tcl_NewIntObj(trustedRefCount);
- objPtr[1] = Tcl_NewIntObj(safeRefCount);
+ TclNewIntObj(objPtr[0], trustedRefCount);
+ TclNewIntObj(objPtr[1], safeRefCount);
if (objPtr[0] == NULL || objPtr[1] == NULL) {
if (objPtr[0]) {
Tcl_DecrRefCount(objPtr[0]);
@@ -882,7 +882,7 @@ Tcl_UnloadObjCmd(
Tcl_DecrRefCount(objPtr[1]);
}
} else {
- resultObjPtr = Tcl_NewListObj(2, objPtr);
+ TclNewListObj(resultObjPtr, 2, objPtr);
if (resultObjPtr != NULL) {
Tcl_SetObjResult(interp, resultObjPtr);
}
@@ -1018,7 +1018,7 @@ int
TclGetLoadedPackages(
Tcl_Interp *interp, /* Interpreter in which to return information
* or error message. */
- char *targetName) /* Name of target interpreter or NULL. If
+ const char *targetName) /* Name of target interpreter or NULL. If
* NULL, return info about all interps;
* otherwise, just return info about this
* interpreter. */