aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez>2005-02-27 22:35:42 +0000
committerantirez <antirez>2005-02-27 22:35:42 +0000
commit4de294e61179961271b5244159c9aea686ba5cb9 (patch)
tree350abb95448df657d09fdb6e9ac48d1e94f6d6e7
parentb22b32a48a7fc5199d7673df9e761ffc903bb20b (diff)
downloadjimtcl-4de294e61179961271b5244159c9aea686ba5cb9.zip
jimtcl-4de294e61179961271b5244159c9aea686ba5cb9.tar.gz
jimtcl-4de294e61179961271b5244159c9aea686ba5cb9.tar.bz2
const added to Jim_NewStringObj
-rw-r--r--TODO13
-rw-r--r--jim.c2
-rw-r--r--jim.h3
3 files changed, 16 insertions, 2 deletions
diff --git a/TODO b/TODO
index bbaa98d..28fa784 100644
--- a/TODO
+++ b/TODO
@@ -48,3 +48,16 @@ ERROR MESSAGES
instead of just:
In procedure 'check' called at file "test.tcl", line 1024
+
+REFERENCES SYSTEM
+
+- The format of the reference will be changed form ~reference:000............:
+ to <reference-<typename>-000000000......>, where typename is the name
+ of the type supplied to the [ref] command at reference creation time.
+ This name is only informative but is stored inside the reference
+ structure, so that for example [lambda] will have as reference name
+ something like <reference-<function>-00000000000000001>, and
+ a list node <reference-<listnode>-00000000000000002> and so on.
+ This makes debugging easier. The name is totally ignored by the
+ garbage collection stage.
+
diff --git a/jim.c b/jim.c
index 657aec8..5c9eb99 100644
--- a/jim.c
+++ b/jim.c
@@ -1772,7 +1772,7 @@ int SetStringFromAny(Jim_Interp *interp, Jim_Obj *objPtr)
return JIM_OK;
}
-Jim_Obj *Jim_NewStringObj(Jim_Interp *interp, char *s, int len)
+Jim_Obj *Jim_NewStringObj(Jim_Interp *interp, const char *s, int len)
{
Jim_Obj *objPtr = Jim_NewObj(interp);
diff --git a/jim.h b/jim.h
index 5f5b0de..0be72b2 100644
--- a/jim.h
+++ b/jim.h
@@ -462,7 +462,8 @@ char * JIM_API(Jim_GetString)(Jim_Obj *objPtr, int *lenPtr);
void JIM_API(Jim_InvalidateStringRep)(Jim_Obj *objPtr);
/* string object */
-Jim_Obj * JIM_API(Jim_NewStringObj) (Jim_Interp *interp, char *s, int len);
+Jim_Obj * JIM_API(Jim_NewStringObj) (Jim_Interp *interp, const char *s,
+ int len);
Jim_Obj * JIM_API(Jim_NewStringObjNoAlloc) (Jim_Interp *interp, char *s,
int len);
void JIM_API(Jim_AppendString) (Jim_Interp *interp, Jim_Obj *objPtr, char *str,