The usual idiom is:
```
#ifdef __cplusplus
extern "C" {
#endif

...

#ifdef __cplusplus
}
#endif
```
though I am not sure why. I can only assume it's because of weird compilers, or from everyone just copying everyone else :stuck_out_tongue:.