# What is replacement for jl\_typeof in the library?

**URL:** <https://discourse.julialang.org/t/what-is-replacement-for-jl-typeof-in-the-library/89792>\
**Category:** Internals & Design\
**Tags:** question\
**Created:** [November 4, 2022, 9:12pm UTC](https://discourse.julialang.org/t/what-is-replacement-for-jl-typeof-in-the-library/89792 "2022-11-04T21:12:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmitry-kazakov/32/6789_2.png) [@dmitry-kazakov](https://discourse.julialang.org/u/dmitry-kazakov)\
**Post date:** [November 4, 2022, 9:12pm UTC](https://discourse.julialang.org/t/what-is-replacement-for-jl-typeof-in-the-library/89792/1 "2022-11-04T21:12:21Z")

</div>

The libjulia relocatable library has no jl\_typeof anymore. From the sources I see that it was replaced by a preprocessor macro. Is there a substitute usable from language bindings?

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmitry-kazakov/32/6789_2.png) [@dmitry-kazakov](https://discourse.julialang.org/u/dmitry-kazakov)\
**Post date:** [November 5, 2022, 8:26am UTC](https://discourse.julialang.org/t/what-is-replacement-for-jl-typeof-in-the-library/89792/2 "2022-11-05T08:26:36Z")

</div>

After investigating it further, this looks like a bug. Actually the macOS version 1.8.2 misses all API function declared using the kludge:

JL\_DLLEXPORT jl\_value\_t \*(jl\_typeof)(jl\_value\_t \*v)  
{  
return jl\_typeof(v);  
}

[placing macro in parenthesis to prevent macro expansion, I suppose]

It is not just jl\_typeof all similar declarations produce no export.

P.S. I did not check Windows or Linux distributions. They might be broken as well.
