|
|
|
|
|
by ryao
300 days ago
|
|
What guarantee do you have that ->ops is a vtable? It could contain function pointers that don’t take an implicit this argument like struct file_operations in Linux does. It could also contain variables that are non-pointers. Neither is allowed in a vtable, but both are fine to do in C. |
|
> It could also contain variables that are non-pointers.
The convention of it being a pure vtable is that it just doesn't.
> Neither is allowed in a vtable
Who is the vtable membership authority? :-)