全部博文(164)
发布时间:2013-07-31 17:42:50
1、linuxany.c代码如下:#include "stdio.h"void display(char* msg){ printf("%s\n",msg);} int add(int a,int b){ return a+b;}2、编译c代码.........【阅读全文】
发布时间:2013-07-31 16:32:56
Here's a demo:from ctypes import * foo = (c_char * 4)() #char数组foo.value = "foo" print foo.raw # => 'foo\x00' foo_ptr = cast(foo, c_char_p) print foo_ptr.value # => 'foo'......【阅读全文】