Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9d600ce1
Commit
9d600ce1
authored
Sep 05, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Cleanup IDirectMusicPerformance_AllocPMsg.
parent
52ae3fad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
+13
-16
performance.c
dlls/dmime/performance.c
+12
-15
dmime.c
dlls/dmime/tests/dmime.c
+1
-1
No files found.
dlls/dmime/performance.c
View file @
9d600ce1
...
...
@@ -81,7 +81,6 @@ struct DMUS_PMSGItem {
};
#define DMUS_PMSGToItem(pMSG) ((DMUS_PMSGItem*) (((unsigned char*) pPMSG) - offsetof(DMUS_PMSGItem, pMsg)))
#define DMUS_ItemToPMSG(pItem) (&(pItem->pMsg))
#define DMUS_ItemRemoveFromQueue(This,pItem) \
{\
if (pItem->prev) pItem->prev->next = pItem->next;\
...
...
@@ -515,23 +514,21 @@ static HRESULT WINAPI performance_GetTime(IDirectMusicPerformance8 *iface, REFER
return
hr
;
}
static
HRESULT
WINAPI
performance_AllocPMsg
(
IDirectMusicPerformance8
*
iface
,
ULONG
cb
,
DMUS_PMSG
**
ppPMSG
)
static
HRESULT
WINAPI
performance_AllocPMsg
(
IDirectMusicPerformance8
*
iface
,
ULONG
size
,
DMUS_PMSG
**
msg
)
{
struct
performance
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
DMUS_PMSGItem
*
pItem
=
NULL
;
struct
performance
*
This
=
impl_from_IDirectMusicPerformance8
(
iface
);
DMUS_PMSGItem
*
message
;
FIXME
(
"(%p, %ld, %p): stub
\n
"
,
This
,
cb
,
ppPMSG
);
TRACE
(
"(%p, %ld, %p)
\n
"
,
This
,
size
,
msg
);
if
(
sizeof
(
DMUS_PMSG
)
>
cb
)
{
return
E_INVALIDARG
;
}
if
(
NULL
==
ppPMSG
)
{
return
E_POINTER
;
}
if
(
!
(
pItem
=
calloc
(
1
,
cb
-
sizeof
(
DMUS_PMSG
)
+
sizeof
(
DMUS_PMSGItem
))))
return
E_OUTOFMEMORY
;
pItem
->
pMsg
.
dwSize
=
cb
;
*
ppPMSG
=
DMUS_ItemToPMSG
(
pItem
);
return
S_OK
;
if
(
!
msg
)
return
E_POINTER
;
if
(
size
<
sizeof
(
DMUS_PMSG
))
return
E_INVALIDARG
;
if
(
!
(
message
=
calloc
(
1
,
size
-
sizeof
(
DMUS_PMSG
)
+
sizeof
(
DMUS_PMSGItem
))))
return
E_OUTOFMEMORY
;
message
->
pMsg
.
dwSize
=
size
;
*
msg
=
&
message
->
pMsg
;
return
S_OK
;
}
static
HRESULT
WINAPI
performance_FreePMsg
(
IDirectMusicPerformance8
*
iface
,
DMUS_PMSG
*
pPMSG
)
...
...
dlls/dmime/tests/dmime.c
View file @
9d600ce1
...
...
@@ -1747,7 +1747,7 @@ static void test_performance_pmsg(void)
hr
=
IDirectMusicPerformance_AllocPMsg
(
performance
,
0
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"got %#lx
\n
"
,
hr
);
hr
=
IDirectMusicPerformance_AllocPMsg
(
performance
,
sizeof
(
DMUS_PMSG
)
-
1
,
&
msg
);
ok
(
hr
==
E_INVALIDARG
,
"got %#lx
\n
"
,
hr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment