Skip to content
Laeeth Isharc edited this page Mar 19, 2015 · 1 revision

Table of Contents

Struct Wrapping

Wrapping D's structs is nearly identical to wrapping classes.

See also

pyd.struct_wrap

As with calls to wrap_class, calls to wrap_struct must occur after calling module_init.

It is important to note that wrapping a struct S makes both S itself and S* available as convertible types.

Automatic operator overloading

Support for operator overloading in structs is identical to that available for classes.

Inheritance

D does not support struct inheritance. Therefore, Pyd does not provide any support for struct inheritance. However, the Python type wrapping the D struct can be subclassed from within Python. Users should not expect polymorphic behavior if they attempt to pass instances of any subclasses back to D.

Examples

TODO

Clone this wiki locally