Skip to content

Commit

Permalink
Merge pull request #2090 from albinahlback/cpp_include_fix
Browse files Browse the repository at this point in the history
Only include headers before `extern "C"`
  • Loading branch information
albinahlback authored Oct 11, 2024
2 parents 0f1659a + 310460c commit 4352a58
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/fexpr.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
#define FEXPR_INLINE static inline
#endif

#ifdef __cplusplus
extern "C" {
#endif

#include "mpoly_types.h"
#include "arf_types.h"
#include "gr_types.h"

#ifdef __cplusplus
extern "C" {
#endif

/* FIXME: We need calcium_stream in ca_types.h, but this header includes qqbar.h
which conditionally defines functions using fexpr_t if and only if FEXPR_H is
defined. And at this point FEXPR_H is defined, but not fexpr_t... */
Expand Down
4 changes: 2 additions & 2 deletions src/fexpr_builtin.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
#define FEXPR_BUILTIN_INLINE static inline
#endif

#include "fexpr.h"

#ifdef __cplusplus
extern "C" {
#endif

#include "fexpr.h"

/* Builtin symbols */

/* Must be listed in alphabetical order with corresponding entry
Expand Down
8 changes: 4 additions & 4 deletions src/fmpz_mpoly_q.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
#define FMPZ_MPOLY_Q_INLINE static inline
#endif

#ifdef __cplusplus
extern "C" {
#endif

#include "fmpz.h"
#include "fmpz_vec.h"
#include "fmpz_mpoly.h"
#include "acb_types.h"

#ifdef __cplusplus
extern "C" {
#endif

#define fmpz_mpoly_q_numref(x) (&((x)->num))
#define fmpz_mpoly_q_denref(x) (&((x)->den))

Expand Down
8 changes: 4 additions & 4 deletions src/qqbar.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
#define QQBAR_INLINE static inline
#endif

#ifdef __cplusplus
extern "C" {
#endif

#include "fmpz_types.h"
#include "fmpq_types.h"
#include "mpoly_types.h"
#include "acb.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct
{
fmpz_poly_struct poly;
Expand Down

0 comments on commit 4352a58

Please sign in to comment.