twcai
unread,Oct 16, 2012, 3:35:45 AM10/16/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to perl...@googlegroups.com
在XS中,像test_struct(定义如下)这样用户定义的结构体,要怎么样以一个Hash的形式返回给Perl代码呢?
浏览了下perlxstypemap,不过因为时间略急,没能找到答案,只好同时在线等大牛解惑。
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);