cd foreign-bindings
make run
# >>> MatSize: len=2, data: 0, 1,
# >>> MatSize2: len=2, data: 0, 1,
make run
# >>> MatSize: len=2, sizes=[0, 1]
# >>> MatSize2: Matsize{len = 0, data = <nil>}
For some reason, MatSize2.data
is nil
, but expected to be initialized memory.
Do not use #packed
by default to interact with C unless you know what are you doing.