Skip to content

Commit

Permalink
Add JL_DLLIMPORT to small_typeof declaration
Browse files Browse the repository at this point in the history
Resolves JuliaLang#50714.
  • Loading branch information
topolarity committed Aug 30, 2023
1 parent 479743e commit 8a0b29a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,9 @@ enum jlsmall_typeof_tags {
jl_bitstags_first = jl_char_tag, // n.b. bool is not considered a bitstype, since it can be compared by pointer
jl_max_tags = 64
};
#ifndef JL_LIBRARY_EXPORTS
JL_DLLIMPORT
#endif
extern jl_datatype_t *small_typeof[(jl_max_tags << 4) / sizeof(jl_datatype_t*)];
static inline jl_value_t *jl_to_typeof(uintptr_t t)
{
Expand Down
6 changes: 6 additions & 0 deletions test/embedding/embedding.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ int main()
checked_eval_string("f28825()");
}

{
// jl_typeof works (#50714)
jl_value_t *v = checked_eval_string("sqrt(2.0)");
jl_value_t *t = jl_typeof(v);
}

JL_TRY {
jl_error("exception thrown");
}
Expand Down

0 comments on commit 8a0b29a

Please sign in to comment.