On Tuesday, October 16, 2012 3:35:45 AM UTC-4, twcai wrote:
在XS中,像test_struct(定义如下)--这样用户定义的结构体, perlxstypemap,不过因为时间略急,要怎么样以一个Hash的形式返回给Perl代码呢?
浏览了下没能找到答案,只好同时在线等大牛解惑。
typedef enum TEST_BOOLEAN {
TEST_FALSE,
TEST_TRUE
}TEST_BOOLEAN;
typedef struct test_struct {
int id;
double radio;
const char *name;
TEST_BOOLEAN exist;
}test_struct;
extern test_struct *foo (int id, double radio, const char *name);
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要在网络上查看此讨论,请访问 https://groups.google.com/d/msg/perlchina/-/292R1SnH3oQJ。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
没有评论:
发表评论