This patch should be quite obvious in its intent: it changes vtable type to IUnknown which helps to remove This* to IUnknown* casts in order to avoid obvious problems with vtable pointer placement inside of object implementation. Basically this is just a clean up patch.
Is there anything else to clear the pending patch state?
Dmitry Timoshkov dmitry@baikal.ru writes:
This patch should be quite obvious in its intent: it changes vtable type to IUnknown which helps to remove This* to IUnknown* casts in order to avoid obvious problems with vtable pointer placement inside of object implementation. Basically this is just a clean up patch.
Is there anything else to clear the pending patch state?
It's just moving the casts around, it doesn't seem like much of an improvement.
Alexandre Julliard julliard@winehq.org wrote:
This patch should be quite obvious in its intent: it changes vtable type to IUnknown which helps to remove This* to IUnknown* casts in order to avoid obvious problems with vtable pointer placement inside of object implementation. Basically this is just a clean up patch.
Is there anything else to clear the pending patch state?
It's just moving the casts around, it doesn't seem like much of an improvement.
The patch actually removes the casts, the only cast that remains is the cast on the caller's side for the vtable pointer (which is much cleaner IMO since every COM object implements IUnknown), but the implementation itself is cast free, and looks now as an actual COM object. I found this 'This' to object cast while investigating a crash in the COM code and decided to fix it since it's clearly wrong and may lead to other problems.
Dmitry Timoshkov dmitry@baikal.ru writes:
The patch actually removes the casts, the only cast that remains is the cast on the caller's side for the vtable pointer (which is much cleaner IMO since every COM object implements IUnknown), but the implementation itself is cast free, and looks now as an actual COM object.
Not really. An actual COM object would contain a pointer to a vtable for the correct interface. IUnknown is not much better than void*.
Alexandre Julliard julliard@winehq.org wrote:
The patch actually removes the casts, the only cast that remains is the cast on the caller's side for the vtable pointer (which is much cleaner IMO since every COM object implements IUnknown), but the implementation itself is cast free, and looks now as an actual COM object.
Not really. An actual COM object would contain a pointer to a vtable for the correct interface. IUnknown is not much better than void*.
enumx doesn't need anything else besides IUnknown interface, having right inteface definition won't change anything.
Dmitry Timoshkov dmitry@baikal.ru writes:
Alexandre Julliard julliard@winehq.org wrote:
The patch actually removes the casts, the only cast that remains is the cast on the caller's side for the vtable pointer (which is much cleaner IMO since every COM object implements IUnknown), but the implementation itself is cast free, and looks now as an actual COM object.
Not really. An actual COM object would contain a pointer to a vtable for the correct interface. IUnknown is not much better than void*.
enumx doesn't need anything else besides IUnknown interface, having right inteface definition won't change anything.
enumx is not a real interface. The real interfaces are IEnumSTATPROPSETSTG and IEnumSTATPROPSTG, and that's what the vtables should be, in the corresponding objects. The common code can be shared with helper functions.