1 Star 0 Fork 21

panxiaohe/tcl

forked from src-openEuler/tcl 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
stay-out-of-internals-when-nice-interfaces-are-avail.patch 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
hexiaowen 提交于 2019-09-30 11:18 . Package init
From d8f01a421223dcf58b22e4cffef613818efde1fa Mon Sep 17 00:00:00 2001
From: dgp <dgp@users.sourceforge.net>
Date: Thu, 24 Mar 2016 12:59:06 +0000
Subject: [PATCH 0238/1800] stay out of internals when nice interfaces are
available.
---
generic/tclTest.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 7c30d36e7..5bfa8f7ca 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -7012,17 +7012,11 @@ TestconcatobjCmd(
list1Ptr = Tcl_NewStringObj("foo bar sum", -1);
Tcl_ListObjLength(NULL, list1Ptr, &len);
- if (list1Ptr->bytes != NULL) {
- ckfree(list1Ptr->bytes);
- list1Ptr->bytes = NULL;
- }
+ Tcl_InvalidateStringrep(list1Ptr);
list2Ptr = Tcl_NewStringObj("eeny meeny", -1);
Tcl_ListObjLength(NULL, list2Ptr, &len);
- if (list2Ptr->bytes != NULL) {
- ckfree(list2Ptr->bytes);
- list2Ptr->bytes = NULL;
- }
+ Tcl_InvalidateStringrep(list2Ptr);
/*
* Verify that concat'ing a list obj with one or more empty strings does
--
2.19.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/panxh_purple/tcl.git
git@gitee.com:panxh_purple/tcl.git
panxh_purple
tcl
tcl
master

搜索帮助