We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tb_dynamic_init
目前tb_dynamic_init在posix上会检查dlerror并丢弃其返回值,而dlerror第二次调用时一定返回空指针;因此如果加载动态链接库时出现错误,无法通过tbox或者系统API获取错误信息。
dlerror
tb_dynamic_init以结构体的形式,打包返回符号表句柄和错误消息指针;
// definiton typedef struct { tb_dynamic_ref_t library; tb_char_t* msg; }tb_dynamic_init_result_t; tb_dynamic_init_result_t tb_dynamic_init(const tb_char_t* name); // usage tb_dynamic_init_result_t res = tb_dynamic_init("/path/to/library");
tb_dynamic_init添加指针参数
// definiton tb_dynamic_ref_t tb_dynamic_init(const tb_char_t* name, tb_char_t** msg); // usage tb_char_t *msg=tb_null; tb_dynamic_ref_t res = tb_dynamic_init("/path/to/library", msg);
dlerror(3p)
The text was updated successfully, but these errors were encountered:
Bot detected the issue body's language is not English, translate it automatically.
Title: tb_dynamic_init should try to return an error message
Sorry, something went wrong.
No branches or pull requests
你在什么场景下需要该功能?
目前
tb_dynamic_init
在posix上会检查dlerror
并丢弃其返回值,而dlerror
第二次调用时一定返回空指针;因此如果加载动态链接库时出现错误,无法通过tbox或者系统API获取错误信息。描述可能的解决方案
tb_dynamic_init
以结构体的形式,打包返回符号表句柄和错误消息指针;描述你认为的候选方案
tb_dynamic_init
添加指针参数其他信息
dlerror(3p)
The text was updated successfully, but these errors were encountered: