Skip to content

Commit 6eac783

Browse files
authored
Merge pull request #2214 from glemercier/master
xnpy.hpp: fix multiple definition of 'host_endian_char' variable when included in different linked objects
2 parents 85e7ad3 + 1f6d76a commit 6eac783

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/xtensor/xnpy.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace xt
6060
const char big_endian_char = '>';
6161
const char no_endian_char = '|';
6262

63-
char host_endian_char = (is_big_endian() ? big_endian_char : little_endian_char);
63+
static char host_endian_char = (is_big_endian() ? big_endian_char : little_endian_char);
6464

6565
template <class O>
6666
inline void write_magic(O& ostream,

0 commit comments

Comments
 (0)