Pass (to Julia) a C struct which contains a pointer to another struct

No.

  1. You already have your pointer, you don’t need to allocate a new one.
  2. You are using C sizeof on a pointer, that’s not going to give you the correct result.
  3. The type is not jl_value_t** and simply Point*.
  4. If you really want to use jl_new_struct, which I still don’t recommend, you should box the pointer to a julia object.

And again, you already have the C object and declared a compatible julia one, you just need to copy the content of the C object to a julia object and you’ll be done.