kou commented on code in PR #13115:
URL: https://github.com/apache/arrow/pull/13115#discussion_r869635008
##########
cpp/src/arrow/c/abi.h:
##########
@@ -60,6 +63,11 @@ struct ArrowArray {
void* private_data;
};
+#endif // ARROW_C_DATA_H
Review Comment:
It seems that this mixes `extern "C" {...}` and `#ifndef ... #endif`:
```c
#ifndef ARROW_C_DATA_H
#define ARROW_C_DATA_H
#ifdef __cplusplus
extern "C" {
#endif
#endif // ARROW_C_DATA_H
#ifndef ARROW_C_STREAM_H
#define ARROW_C_STREAM_H
#ifdef __cplusplus
}
#endif
#endif // ARROW_C_STREAM_H
```
I think that it may not be safe. How about avoiding the mix?
```c
#ifndef ARROW_C_DATA_H
#define ARROW_C_DATA_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif // ARROW_C_DATA_H
#ifndef ARROW_C_STREAM_H
#define ARROW_C_STREAM_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif // ARROW_C_STREAM_H
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]