Skip to content

Commit

Permalink
SuiteSparse_config: Avoid including headers in extern "C" block.
Browse files Browse the repository at this point in the history
Including headers (from the standard library) in extern "C" blocks can be
problematic.

Use extern "C" block only around function declarations.
  • Loading branch information
mmuetzel committed Jun 6, 2024
1 parent 3df9cb3 commit 84fdcc9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions SuiteSparse_config/Config/SuiteSparse_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
#ifndef SUITESPARSE_CONFIG_H
#define SUITESPARSE_CONFIG_H

#ifdef __cplusplus
extern "C"
{
#endif

//------------------------------------------------------------------------------
// SuiteSparse-wide ANSI C11 #include files
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -263,6 +258,11 @@ extern "C"

#endif

#ifdef __cplusplus
extern "C"
{
#endif

//==============================================================================
// SuiteSparse_config parameters and functions
//==============================================================================
Expand Down
10 changes: 5 additions & 5 deletions SuiteSparse_config/SuiteSparse_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
#ifndef SUITESPARSE_CONFIG_H
#define SUITESPARSE_CONFIG_H

#ifdef __cplusplus
extern "C"
{
#endif

//------------------------------------------------------------------------------
// SuiteSparse-wide ANSI C11 #include files
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -263,6 +258,11 @@ extern "C"

#endif

#ifdef __cplusplus
extern "C"
{
#endif

//==============================================================================
// SuiteSparse_config parameters and functions
//==============================================================================
Expand Down

0 comments on commit 84fdcc9

Please sign in to comment.