#include "hello.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Bool hello_print_message(const char *message)
{
printf("Hello: %s\n", message);
return 0;
}
double hello_sum(double x, double y)
{
return x + y;
}
struct _HelloFoo
{
int refcount;
char *data;
};
HelloFoo*
hello_foo_new(void)
{
HelloFoo *foo;
foo = (HelloFoo *) malloc(sizeof(HelloFoo));
foo->refcount = 1;
foo->data = NULL;
return foo;
}
HelloFoo*
hello_foo_new_from_data(const char *data)
{
HelloFoo* foo;
foo = hello_foo_new();
hello_foo_set_data(foo, data);
return foo;
}
HelloFoo*
hello_foo_new_with_spaces (int num_spaces)
{
int i;
HelloFoo *foo;
foo = hello_foo_new();
foo->data = malloc(num_spaces + 1);
for (i = 0; i < num_spaces; i++)
foo->data[i] = ' ';
foo->data[i] = '\0';
return foo;
}
void
hello_foo_ref(HelloFoo *foo)
{
foo->refcount++;
}
void
hello_foo_unref(HelloFoo *foo)
{
if (--foo->refcount > 0)
return;
if (foo->data)
free(foo->data);
free(foo);
}
void
hello_foo_set_data(HelloFoo *foo,
const char *data)
{
if (foo->data)
free(foo->data);
foo->data = strdup(data);
}
const char *
hello_foo_get_data(HelloFoo *foo)
{
return foo->data;
}
const HelloFoo* hello_foo_get_self (HelloFoo *foo)
{
return foo;
}
int hello_get_hash (const HelloFoo *foo)
{
if (foo)
{
return (int) (long) foo;
} else {
return -1;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
PyPI 官网下载 | PyBindGen-0.17.0.tar.gz (142个子文件)
waf.bat 28B
hello.c 1KB
foo.cc 10KB
testapi_boost.cc 1KB
testapi.cc 710B
e.cc 658B
c.cc 581B
d.cc 425B
c.cc 338B
h.cc 267B
b.cc 247B
g.cc 238B
a.cc 237B
bar.cc 233B
bsp.cc 204B
f.cc 139B
c.cc 123B
foo.h 30KB
stdint.h 27KB
bar.h 1KB
hello.h 944B
bsp.h 595B
testapi.h 542B
b.h 317B
a.h 256B
e.h 238B
c.h 231B
h.h 162B
d.h 162B
f.h 141B
b.h 114B
g.h 108B
c.h 95B
c.h 90B
a.h 87B
testapi_swig.i 543B
PKG-INFO 248B
cppclass.py 178KB
gccxmlparser.py 108KB
base.py 54KB
cppmethod.py 48KB
footest.py 46KB
module.py 38KB
container.py 33KB
foomodulegen.py 31KB
inttype.py 30KB
pytypeobject.py 18KB
python_patched.py 17KB
stringtype.py 16KB
cppattribute.py 16KB
function.py 14KB
overloading.py 14KB
shellcmd.py 12KB
__init__.py 12KB
test-generation.py 10KB
cppclass_container.py 10KB
tokenizer.py 10KB
utils.py 8KB
boost.py 8KB
enum.py 7KB
bench.py 7KB
cppexception.py 6KB
wrapper_registry.py 6KB
cppcustomattribute.py 6KB
converter_functions.py 6KB
floattype.py 5KB
foomodulegen_common.py 5KB
command.py 5KB
cflags.py 5KB
booltype.py 5KB
codesink.py 4KB
wutils.py 4KB
settings.py 3KB
bartest.py 3KB
doubletype.py 3KB
test.py 3KB
barmodulegen.py 3KB
plotresults.py 3KB
test.py 2KB
pyobjecttype.py 2KB
foomodulegen4.py 2KB
foomodulegen-auto-split.py 2KB
pkgconfig.py 2KB
foomodulegen-auto.py 2KB
hellomodulegen.py 2KB
modulegen.py 2KB
foomodulegen3.py 1KB
modulegen.py 1KB
testapi-pybindgen.py 1KB
modulegen.py 1KB
hellotest.py 1KB
modulegen.py 1KB
modulegen.py 987B
modulegen.py 837B
modulegen.py 764B
bmodulegen.py 753B
modulegen.py 744B
modulegen.py 682B
modulegen.py 680B
__init__.py 554B
共 142 条
- 1
- 2
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功