# Struct with Abstract type and jl\_get\_function()

**URL:** <https://discourse.julialang.org/t/struct-with-abstract-type-and-jl-get-function/119751>\
**Category:** General Usage\
**Tags:** question\
**Created:** [September 23, 2024, 2:18pm UTC](https://discourse.julialang.org/t/struct-with-abstract-type-and-jl-get-function/119751 "2024-09-23T14:18:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PatriceLebrun](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/patricelebrun/32/44599_2.png) [@PatriceLebrun](https://discourse.julialang.org/u/PatriceLebrun)\
**Post date:** [September 23, 2024, 2:18pm UTC](https://discourse.julialang.org/t/struct-with-abstract-type-and-jl-get-function/119751/1 "2024-09-23T14:18:59Z")

</div>

Hi, I define

```julia
   struct CDChitsICEDUST{T <: AbstractFloat}
        xstarts::Vector{T}
        ystarts::Vector{T}
      ....
    end
so I get a wrong value if I do a
jl_get_function((jl_module_t *) mod, "CDChitsICEDUST{Cfloat}")

I can fix it if I define:
    CDChitsICEDUST_Cfloat = CDChitsICEDUST{Cfloat}

```

and I do a jl\_get\_function((jl\_module\_t \*) mod, “CDChitsICEDUST\_Cfloat”)

Is it a normal behavior ?  
(this code is for using a julia package from a C code).  
Thank you.
