Skip to content

Commit

Permalink
refactor: remove unneeded extern keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
szhorvat committed Nov 18, 2024
1 parent 0466aae commit 9b3b27b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
8 changes: 4 additions & 4 deletions include/plfit_sampling.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ PLFIT_EXPORT double plfit_rbinom(double n, double p, plfit_mt_rng_t* rng);
*
* \return the sample or NaN if one of the parameters is invalid
*/
PLFIT_EXPORT extern double plfit_rpareto(double xmin, double alpha, plfit_mt_rng_t* rng);
PLFIT_EXPORT double plfit_rpareto(double xmin, double alpha, plfit_mt_rng_t* rng);

/**
* Draws a given number of samples from a Pareto distribution with the given
Expand Down Expand Up @@ -80,7 +80,7 @@ PLFIT_EXPORT int plfit_rpareto_array(double xmin, double alpha, size_t n, plfit_
*
* \return the sample or NaN if one of the parameters is invalid
*/
PLFIT_EXPORT extern double plfit_rzeta(long int xmin, double alpha, plfit_mt_rng_t* rng);
PLFIT_EXPORT double plfit_rzeta(long int xmin, double alpha, plfit_mt_rng_t* rng);

/**
* Draws a given number of samples from a zeta distribution with the given
Expand Down Expand Up @@ -109,7 +109,7 @@ PLFIT_EXPORT int plfit_rzeta_array(long int xmin, double alpha, size_t n, plfit_
* \param rng the Mersenne Twister random number generator to use
* \return the value drawn from the given uniform distribution.
*/
PLFIT_EXPORT extern double plfit_runif(double lo, double hi, plfit_mt_rng_t* rng);
PLFIT_EXPORT double plfit_runif(double lo, double hi, plfit_mt_rng_t* rng);

/**
* Draws a sample from a uniform distribution over the [0; 1) interval.
Expand All @@ -119,7 +119,7 @@ PLFIT_EXPORT extern double plfit_runif(double lo, double hi, plfit_mt_rng_t* rng
* \param rng the Mersenne Twister random number generator to use
* \return the value drawn from the given uniform distribution.
*/
PLFIT_EXPORT extern double plfit_runif_01(plfit_mt_rng_t* rng);
PLFIT_EXPORT double plfit_runif_01(plfit_mt_rng_t* rng);

/**
* Random sampler using Walker's alias method.
Expand Down
12 changes: 0 additions & 12 deletions src/hzeta.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ double hsl_sf_hzeta_eulermaclaurin_series_majorantratios[HSL_SF_HZETA_EULERMACLA
NAN}; // hsl_sf_hzeta_eulermaclaurin_series_majorantratios


extern
int hsl_sf_hzeta_e(const double s, const double q, gsl_sf_result * result) {

/* CHECK_POINTER(result) */
Expand Down Expand Up @@ -263,11 +262,9 @@ int hsl_sf_hzeta_e(const double s, const double q, gsl_sf_result * result) {

}

extern
double hsl_sf_hzeta(const double s, const double q) {
HSL_SF_EVAL_RESULT(hsl_sf_hzeta_e(s,q,&result)); }

extern
int hsl_sf_hzeta_deriv_e(const double s, const double q, gsl_sf_result * result) {

/* CHECK_POINTER(result) */
Expand Down Expand Up @@ -328,11 +325,9 @@ int hsl_sf_hzeta_deriv_e(const double s, const double q, gsl_sf_result * result)

}

extern
double hsl_sf_hzeta_deriv(const double s, const double q) {
HSL_SF_EVAL_RESULT(hsl_sf_hzeta_deriv_e(s,q,&result)); }

extern
int hsl_sf_hzeta_deriv2_e(const double s, const double q, gsl_sf_result * result) {

/* CHECK_POINTER(result) */
Expand Down Expand Up @@ -406,7 +401,6 @@ int hsl_sf_hzeta_deriv2_e(const double s, const double q, gsl_sf_result * result

}

extern
double hsl_sf_hzeta_deriv2(const double s, const double q) {
HSL_SF_EVAL_RESULT(hsl_sf_hzeta_deriv2_e(s,q,&result)); }

Expand Down Expand Up @@ -587,7 +581,6 @@ int hsl_sf_hZeta1(const double s, const double q, const double ln_q, double * va

return (PLFIT_SUCCESS); }

extern
int hsl_sf_lnhzeta_deriv_tuple_e(const double s, const double q, gsl_sf_result * result, gsl_sf_result * result_deriv) {

/* CHECK_POINTER(result) */
Expand Down Expand Up @@ -648,23 +641,18 @@ int hsl_sf_lnhzeta_deriv_tuple_e(const double s, const double q, gsl_sf_result *

return (PLFIT_SUCCESS); }

extern
double hsl_sf_lnhzeta_deriv_tuple(const double s, const double q, double * tuple0, double * tuple1) {
HSL_SF_EVAL_TUPLE_RESULT(hsl_sf_lnhzeta_deriv_tuple_e(s,q,&result0,&result1)); }

extern
int hsl_sf_lnhzeta_e(const double s, const double q, gsl_sf_result * result) {
return (hsl_sf_lnhzeta_deriv_tuple_e(s,q,result,NULL)); }

extern
double hsl_sf_lnhzeta(const double s, const double q) {
HSL_SF_EVAL_RESULT(hsl_sf_lnhzeta_e(s,q,&result)); }

extern
int hsl_sf_lnhzeta_deriv_e(const double s, const double q, gsl_sf_result * result) {
return (hsl_sf_lnhzeta_deriv_tuple_e(s,q,NULL,result)); }

extern
double hsl_sf_lnhzeta_deriv(const double s, const double q) {
HSL_SF_EVAL_RESULT(hsl_sf_lnhzeta_deriv_e(s,q,&result)); }

Expand Down

0 comments on commit 9b3b27b

Please sign in to comment.