相关疑难解决方法(0)

函数名称和原型中的斜线和点?

我是C的新手,看着Go的源代码树,我发现了这个:

https://code.google.com/p/go/source/browse/src/pkg/runtime/race.c

void runtime?race·Read(int32 goid, void *addr, void *pc);
void runtime?race·Write(int32 goid, void *addr, void *pc);

void
runtime·raceinit(void)
{
    // ...
}
Run Code Online (Sandbox Code Playgroud)

斜线和点(·)是什么意思?这是有效的C吗?

c notation go

18
推荐指数
3
解决办法
2340
查看次数

C中的非ASCII字符

我正在查看谷歌go的运行时源代码(在https://go.googlecode.com/hg/src/pkg/runtime/),似乎他们使用特殊字符作为其函数名称,·.(例如,访问https://go.googlecode.com/hg/src/pkg/runtime/cgocall.c).这是否被主要编译器接受?它不是ANSI C,是吗?或者它只是一些宏观魔法?

谢谢!

c namespaces ansi naming-conventions standards-compliance

5
推荐指数
1
解决办法
1042
查看次数