chiark
/
gitweb
/
~ian
/
chiark-tcl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eddc638
)
Do not invalidate string rep of shared objs.
author
ian
<ian>
Wed, 2 Oct 2002 00:08:31 +0000
(
00:08
+0000)
committer
ian
<ian>
Wed, 2 Oct 2002 00:08:31 +0000
(
00:08
+0000)
base/parse.c
patch
|
blob
|
history
hbytes/parse.c
patch
|
blob
|
history
diff --git
a/base/parse.c
b/base/parse.c
index 5e1f918d99d886a829fb06c8cf8afefa5888cb91..44f00e2a25727c2333b07ccb4f67a2700931e08c 100644
(file)
--- a/
base/parse.c
+++ b/
base/parse.c
@@
-42,11
+42,11
@@
int pat_hbv(Tcl_Interp *ip, Tcl_Obj *var, HBytes_Var *agg) {
rc= Tcl_ConvertToType(ip,val,&hbytes_type);
if (rc) return rc;
rc= Tcl_ConvertToType(ip,val,&hbytes_type);
if (rc) return rc;
- Tcl_InvalidateStringRep(val);
if (Tcl_IsShared(val)) {
val= Tcl_DuplicateObj(val);
agg->copied= 1;
}
if (Tcl_IsShared(val)) {
val= Tcl_DuplicateObj(val);
agg->copied= 1;
}
+ Tcl_InvalidateStringRep(val);
agg->obj= val;
agg->hb= OBJ_HBYTES(val);
agg->obj= val;
agg->hb= OBJ_HBYTES(val);
diff --git
a/hbytes/parse.c
b/hbytes/parse.c
index 5e1f918d99d886a829fb06c8cf8afefa5888cb91..44f00e2a25727c2333b07ccb4f67a2700931e08c 100644
(file)
--- a/
hbytes/parse.c
+++ b/
hbytes/parse.c
@@
-42,11
+42,11
@@
int pat_hbv(Tcl_Interp *ip, Tcl_Obj *var, HBytes_Var *agg) {
rc= Tcl_ConvertToType(ip,val,&hbytes_type);
if (rc) return rc;
rc= Tcl_ConvertToType(ip,val,&hbytes_type);
if (rc) return rc;
- Tcl_InvalidateStringRep(val);
if (Tcl_IsShared(val)) {
val= Tcl_DuplicateObj(val);
agg->copied= 1;
}
if (Tcl_IsShared(val)) {
val= Tcl_DuplicateObj(val);
agg->copied= 1;
}
+ Tcl_InvalidateStringRep(val);
agg->obj= val;
agg->hb= OBJ_HBYTES(val);
agg->obj= val;
agg->hb= OBJ_HBYTES(val);