Skip to content

Commit

Permalink
Adding extern 'C' declarations to header files so that easel function…
Browse files Browse the repository at this point in the history
…s link correctly into C++ code (like CUDA).
  • Loading branch information
npcarter committed Sep 13, 2019
1 parent 6802644 commit f095da4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions esl_alphabet.h
Expand Up @@ -6,7 +6,9 @@

#include <ctype.h> /* isascii() */
#include "easel.h"

#ifdef __cplusplus // magic to make C++ compilers happy
extern "C" {
#endif
/* Flags for alphabet types.
* Do not change, only add, because these codes are used in file formats.
*/
Expand Down Expand Up @@ -124,5 +126,7 @@ extern int esl_abc_ValidateSeq(const ESL_ALPHABET *a, const char *seq, int64_
#define esl_abc_CGetUnknown(a) ((a)->sym[(a)->Kp-3])
#define esl_abc_CGetNonresidue(a) ((a)->sym[(a)->Kp-2])
#define esl_abc_CGetMissing(a) ((a)->sym[(a)->Kp-1])

#ifdef __cplusplus // magic to make C++ compilers happy
}
#endif
#endif /*eslALPHABET_INCLUDED*/

0 comments on commit f095da4

Please sign in to comment.