Hi Bernhard,
On 3/5/22 20:54, Bernhard Kölbl wrote:
Signed-off-by: Bernhard Kölbl besentv@gmail.com
dlls/windows.media.speech/synthesizer.c | 66 ++++++++++++------------- 1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/dlls/windows.media.speech/synthesizer.c b/dlls/windows.media.speech/synthesizer.c index b2719e46f8b..6af198817c5 100644 --- a/dlls/windows.media.speech/synthesizer.c +++ b/dlls/windows.media.speech/synthesizer.c @@ -366,27 +366,27 @@ static const struct IClosableVtbl closable_vtbl = closable_Close, };
-struct windows_media_speech +struct activation_factory { IActivationFactory IActivationFactory_iface; IInstalledVoicesStatic IInstalledVoicesStatic_iface; LONG ref; };
I'd suggest something like synthesizer_statics or synthesizer_factory for the struct name, the "activation" is really just one aspect of the type.
-static inline struct windows_media_speech *impl_from_IActivationFactory(IActivationFactory *iface) +static inline struct activation_factory *impl_from_IActivationFactory(IActivationFactory *iface) {
- return CONTAINING_RECORD(iface, struct windows_media_speech, IActivationFactory_iface);
- return CONTAINING_RECORD(iface, struct activation_factory, IActivationFactory_iface); }
-static inline struct windows_media_speech *impl_from_IInstalledVoicesStatic(IInstalledVoicesStatic *iface) +static inline struct activation_factory *impl_from_IInstalledVoicesStatic(IInstalledVoicesStatic *iface) {
- return CONTAINING_RECORD(iface, struct windows_media_speech, IInstalledVoicesStatic_iface);
- return CONTAINING_RECORD(iface, struct activation_factory, IInstalledVoicesStatic_iface); }
-static HRESULT STDMETHODCALLTYPE windows_media_speech_QueryInterface( +static HRESULT STDMETHODCALLTYPE activation_factory_QueryInterface( IActivationFactory *iface, REFIID iid, void **out) {
- struct windows_media_speech *impl = impl_from_IActivationFactory(iface);
struct activation_factory *impl = impl_from_IActivationFactory(iface);
TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out);
@@ -412,46 +412,46 @@ static HRESULT STDMETHODCALLTYPE windows_media_speech_QueryInterface( return E_NOINTERFACE; }
To make things shorter, I think it's possible to use WINAPI instead of STDMETHODCALLTYPE.
Then, I'd suggest to use even shorter prefixes, such as activation_ or factory_, and later statics_ for the statics iface.
Of course unless this would cause ambiguities later on.
-static struct windows_media_speech windows_media_speech = +static struct activation_factory speechsynthesizer_af = {
- {&activation_factory_vtbl},
- {&installed_voices_static_vtbl},
- 1
- .IActivationFactory_iface = {&activation_factory_vtbl},
- .IInstalledVoicesStatic_iface = {&installed_voices_static_vtbl},
- .ref = 1 };
I think the variable could also be named synthesizer_statics or something matching the struct.