Skip to content

Commit

Permalink
Merge pull request #15202 from WarrenWeckesser/cxx-externc-cleanup
Browse files Browse the repository at this point in the history
MAINT: special: Don't use macro for 'extern "C"' in strictly C++ files.
  • Loading branch information
rgommers committed Dec 13, 2021
2 parents 4290ecb + e23e3d3 commit 62bdc88
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 23 deletions.
4 changes: 2 additions & 2 deletions scipy/special/_faddeeva.cxx
Expand Up @@ -4,7 +4,7 @@

using namespace std;

EXTERN_C_START
extern "C" {

npy_cdouble faddeeva_w(npy_cdouble zp)
{
Expand Down Expand Up @@ -149,4 +149,4 @@ double faddeeva_voigt_profile(double x, double sigma, double gamma)
return real(w) / sigma / SQRT_2PI;
}

EXTERN_C_END
} // extern "C"
4 changes: 2 additions & 2 deletions scipy/special/_wright.cxx
Expand Up @@ -4,7 +4,7 @@

using namespace std;

EXTERN_C_START
extern "C" {

npy_cdouble wrightomega(npy_cdouble zp)
{
Expand All @@ -18,4 +18,4 @@ double wrightomega_real(double x)
return wright::wrightomega_real(x);
}

EXTERN_C_END
} // extern "C"
21 changes: 2 additions & 19 deletions scipy/special/ellint_carlson_wrap.cxx
@@ -1,24 +1,11 @@
#include "ellint_carlson_wrap.hh"


#undef _BEGIN_EXTERN_C
#undef _END_EXTERN_C
#ifdef __cplusplus
#define _BEGIN_EXTERN_C extern "C" {
#define _END_EXTERN_C }
#else
#define _BEGIN_EXTERN_C /* nothing */
#define _END_EXTERN_C /* nothing */
#endif


#include "sf_error.h"


static constexpr double ellip_rerr = 5e-16;


_BEGIN_EXTERN_C
extern "C" {


double fellint_RC(double x, double y)
Expand Down Expand Up @@ -151,8 +138,4 @@ npy_cdouble cellint_RJ(npy_cdouble x, npy_cdouble y, npy_cdouble z, npy_cdouble
}


_END_EXTERN_C


#undef _BEGIN_EXTERN_C
#undef _END_EXTERN_C
} // extern "C"

0 comments on commit 62bdc88

Please sign in to comment.