Skip to content

Commit

Permalink
Fix extern C header ifdef to not wrap include statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlion committed Apr 25, 2024
1 parent c4abd24 commit 50bec08
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
8 changes: 4 additions & 4 deletions cpp/src/ffi_go/ir/decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
// NOLINTBEGIN(modernize-use-trailing-return-type)
// NOLINTBEGIN(modernize-use-using)

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>
#include <stdlib.h>

#include <ffi_go/defs.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* Create a ir::Decoder used as the underlying data storage for a Go ir.Decoder.
* @return New ir::Decoder's address
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/ffi_go/ir/deserializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
// NOLINTBEGIN(modernize-deprecated-headers)
// NOLINTBEGIN(modernize-use-trailing-return-type)

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>
#include <stdlib.h>

#include <ffi_go/defs.h>
#include <ffi_go/search/wildcard_query.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* Clean up the underlying ir::Deserializer of a Go ir.Deserializer.
* @param[in] ir_deserializer The address of a ir::Deserializer created and
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/ffi_go/ir/encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
// NOLINTBEGIN(modernize-use-trailing-return-type)
// NOLINTBEGIN(modernize-use-using)

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>
#include <stdlib.h>

#include <ffi_go/defs.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* Create a ir::Encoder used as the underlying data storage for a Go ir.Encoder.
* @return New ir::Encoder's address
Expand Down
8 changes: 8 additions & 0 deletions cpp/src/ffi_go/ir/serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

#include <ffi_go/defs.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* Clean up the underlying ir::Serializer of a Go ir.Serializer.
* @param[in] ir_serializer Address of a ir::Serializer created and returned by
Expand Down Expand Up @@ -104,6 +108,10 @@ int ir_serializer_serialize_four_byte_log_event(
ByteSpan* ir_view
);

#ifdef __cplusplus
}
#endif

// NOLINTEND(modernize-use-trailing-return-type)
// NOLINTEND(modernize-deprecated-headers)
#endif // FFI_GO_IR_SERIALIZER_H
8 changes: 4 additions & 4 deletions cpp/src/ffi_go/search/wildcard_query.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
// NOLINTBEGIN(modernize-use-trailing-return-type)
// NOLINTBEGIN(modernize-use-using)

#ifdef __cplusplus
extern "C" {
#endif

#include <stdbool.h>

#include <ffi_go/defs.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* A timestamp interval of [m_lower, m_upper).
*/
Expand Down

0 comments on commit 50bec08

Please sign in to comment.