Nikolay Sivov : mfplat: Remove typedef for attributes structure.

Alexandre Julliard julliard at winehq.org
Fri Mar 22 16:06:18 CDT 2019


Module: wine
Branch: master
Commit: 52cca8e8e301b753b1f9e8c961dd2150d6aeaa65
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=52cca8e8e301b753b1f9e8c961dd2150d6aeaa65

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Mar 22 09:15:14 2019 +0300

mfplat: Remove typedef for attributes structure.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mfplat/main.c           | 18 +++++++++---------
 dlls/mfplat/mfplat_private.h |  4 ++--
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
index 8e9cb66..30c3073 100644
--- a/dlls/mfplat/main.c
+++ b/dlls/mfplat/main.c
@@ -644,9 +644,9 @@ static const char *debugstr_attr(const GUID *guid)
     return ret ? wine_dbg_sprintf("%s", ret->name) : wine_dbgstr_guid(guid);
 }
 
-static inline mfattributes *impl_from_IMFAttributes(IMFAttributes *iface)
+static inline struct attributes *impl_from_IMFAttributes(IMFAttributes *iface)
 {
-    return CONTAINING_RECORD(iface, mfattributes, IMFAttributes_iface);
+    return CONTAINING_RECORD(iface, struct attributes, IMFAttributes_iface);
 }
 
 static HRESULT WINAPI mfattributes_QueryInterface(IMFAttributes *iface, REFIID riid, void **out)
@@ -668,12 +668,12 @@ static HRESULT WINAPI mfattributes_QueryInterface(IMFAttributes *iface, REFIID r
 
 static ULONG WINAPI mfattributes_AddRef(IMFAttributes *iface)
 {
-    mfattributes *This = impl_from_IMFAttributes(iface);
-    ULONG ref = InterlockedIncrement(&This->ref);
+    struct attributes *attributes = impl_from_IMFAttributes(iface);
+    ULONG refcount = InterlockedIncrement(&attributes->ref);
 
-    TRACE("(%p) ref=%u\n", This, ref);
+    TRACE("%p, refcount %d.\n", iface, refcount);
 
-    return ref;
+    return refcount;
 }
 
 static ULONG WINAPI mfattributes_Release(IMFAttributes *iface)
@@ -1792,7 +1792,7 @@ HRESULT WINAPI MFInitAttributesFromBlob(IMFAttributes *dest, const UINT8 *buffer
 
 typedef struct _mfbytestream
 {
-    mfattributes attributes;
+    struct attributes attributes;
     IMFByteStream IMFByteStream_iface;
 } mfbytestream;
 
@@ -2273,7 +2273,7 @@ HRESULT WINAPI MFGetPluginControl(IMFPluginControl **ret)
 
 typedef struct _mfpresentationdescriptor
 {
-    mfattributes attributes;
+    struct attributes attributes;
     IMFPresentationDescriptor IMFPresentationDescriptor_iface;
 } mfpresentationdescriptor;
 
@@ -3566,7 +3566,7 @@ HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **resolver)
 
 typedef struct media_event
 {
-    mfattributes attributes;
+    struct attributes attributes;
     IMFMediaEvent IMFMediaEvent_iface;
 
     MediaEventType type;
diff --git a/dlls/mfplat/mfplat_private.h b/dlls/mfplat/mfplat_private.h
index 7d2e25f..b3ed176 100644
--- a/dlls/mfplat/mfplat_private.h
+++ b/dlls/mfplat/mfplat_private.h
@@ -30,7 +30,7 @@ struct attribute
     PROPVARIANT value;
 };
 
-typedef struct attributes
+struct attributes
 {
     IMFAttributes IMFAttributes_iface;
     LONG ref;
@@ -38,7 +38,7 @@ typedef struct attributes
     struct attribute *attributes;
     size_t capacity;
     size_t count;
-} mfattributes;
+};
 
 extern HRESULT init_attributes_object(struct attributes *object, UINT32 size) DECLSPEC_HIDDEN;
 extern void clear_attributes_object(struct attributes *object) DECLSPEC_HIDDEN;




More information about the wine-cvs mailing list