xflouris / libpll-2

Phylogenetic Likelihood Library 2 - experimental
GNU Affero General Public License v3.0
9 stars 12 forks source link

A few missing exports in libpll #21

Closed jdx-gh closed 2 years ago

jdx-gh commented 2 years ago

It seems that a few exports are missing in pll.h and phylip.c. It doesn't matter on Unix-like systems but it does on Windows when the shared libpll is built. Here is the patch:

diff --git a/src/phylip.c b/src/phylip.c
index f3ae37f..459fa17 100644
--- a/src/phylip.c
+++ b/src/phylip.c
@@ -711,7 +711,7 @@ PLL_EXPORT pll_msa_t * pll_phylip_parse_sequential(pll_phylip_t * fd)
   return msa;
 }

-pll_msa_t * pll_phylip_load(const char * fname, pll_bool_t interleaved)
+PLL_EXPORT pll_msa_t * pll_phylip_load(const char * fname, pll_bool_t interleaved)
 {
   pll_phylip_t * fd = pll_phylip_open(fname, pll_map_generic);
   if (!fd)
diff --git a/src/pll.h b/src/pll.h
index b202a3d..3b80ed4 100644
--- a/src/pll.h
+++ b/src/pll.h
@@ -875,7 +875,7 @@ PLL_EXPORT long pll_fasta_getfilepos(pll_fasta_t * fd);

 PLL_EXPORT int pll_fasta_rewind(pll_fasta_t * fd);

-pll_msa_t * pll_fasta_load(const char * fname);
+PLL_EXPORT pll_msa_t * pll_fasta_load(const char * fname);

 /* functions in parse_rtree.y */

@@ -988,7 +988,7 @@ PLL_EXPORT pll_msa_t * pll_phylip_parse_interleaved(pll_phylip_t * fd);

 PLL_EXPORT pll_msa_t * pll_phylip_parse_sequential(pll_phylip_t * fd);

-pll_msa_t * pll_phylip_load(const char * fname, pll_bool_t interleaved);
+PLL_EXPORT pll_msa_t * pll_phylip_load(const char * fname, pll_bool_t interleaved);

 /* functions in rtree.c */
amkozlov commented 2 years ago

thank you, merged!