like this, adapted from here (btw, that could use an update since cffi_utils moved)
from cffi import FFI
from numba.core.typing import cffi_utils
src = """
typedef struct nested_struct {
float x;
} nested_struct;
/* Define the C struct */
typedef struct my_struct {
nested_struct* nested;
} my_struct;
"""
ffi = FFI()
ffi.cdef(src)
print(cffi_utils.map_type(ffi.typeof('my_struct'), use_record_dtype=True))
error is
NotImplementedError: Record(x[type=float32;offset=0];4;True)* cannot be represented as a Numpy dtype
with use_record_dtype=False, error is
File “/home/test/PycharmProjects/test1/venv/lib/python3.7/site-packages/numba/core/typing/cffi_utils.py”, line 134, in map_type
raise TypeError(cffi_type)
TypeError: <ctype ‘my_struct’>