avatar
[转载] Tcl/C++ question# Programming - 葵花宝典
a*e
1
【 以下文字转载自 Linux 讨论区 】
【 原文由 agare 所发表 】
I have a program. Let Tcl do iteration.
In the iteration body, it calls C++ modules.
The question is:
in C++ modules, it creates objects, how can I keep these objects alive
after the call finished. So for the next iteration, these objects are still
available.
avatar
a*e
2
No one knows?
I hear that using "Tcl_IncrRefCount" can do this. But the problem is:
The manual says it need a new "Tcl_Obj*" first. I don't know how to
hook my objects to this "Tcl_Obj". It seems Tcl only have very few
predefined objects (int,string,list). How to deal with non-defined
objects?
I tried, but failed.

【在 a***e 的大作中提到】
: 【 以下文字转载自 Linux 讨论区 】
: 【 原文由 agare 所发表 】
: I have a program. Let Tcl do iteration.
: In the iteration body, it calls C++ modules.
: The question is:
: in C++ modules, it creates objects, how can I keep these objects alive
: after the call finished. So for the next iteration, these objects are still
: available.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。