D struct with String type accessing from Python

Ali Çehreli acehreli at yahoo.com
Mon Dec 26 16:44:37 UTC 2022


On 12/25/22 20:41, cc wrote:
 > D stores the size of a slice before the pointer.

And that's in the ABI spec:

   https://dlang.org/spec/abi.html#arrays

Another important topic is object lifetimes because Python and D garbage 
collectors not necessarily know about objects created by the other side.

In any case, I have a presentation "Exposing a D Library to Python 
Through a C API", which touches up on these topics:

   https://www.youtube.com/watch?v=FNL-CPX4EuM

(Note: Yes, that was covid hair. :) )

Ali



More information about the Digitalmars-d mailing list