[–] thechao 7y ago ↗ This is handle-pass style, and is the most straightforward way to add objects to existing C code (it’s “backwards compatible”). However, it makes shimming and partial derivation nearly impossible. Instead, the entire table should be passed back: typedef struct intf intf; int (*newIntfCB)(intf*, ...) typedef stuct intf { void *handle; newIntfCB newIntf; } intf; (Here’s hoping beachside phone programming has resulted in valid C code.)
1 comment
[ 3.7 ms ] story [ 15.6 ms ] thread