winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2019
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1097 discussions
Start a n
N
ew thread
Zebediah Figura : quartz/systemclock: Get rid of the SystemClockImpl typedef.
by Alexandre Julliard
18 Mar '19
18 Mar '19
Module: wine Branch: master Commit: f55e90a508f5d2eb23a076008667156b8576adb1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f55e90a508f5d2eb23a07600…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Mar 16 09:11:50 2019 -0500 quartz/systemclock: Get rid of the SystemClockImpl typedef. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/systemclock.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c index 1a1361c..15f8ea0 100644 --- a/dlls/quartz/systemclock.c +++ b/dlls/quartz/systemclock.c @@ -36,7 +36,8 @@ struct advise_sink int cookie; }; -typedef struct SystemClockImpl { +struct system_clock +{ IReferenceClock IReferenceClock_iface; LONG ref; @@ -46,16 +47,16 @@ typedef struct SystemClockImpl { CRITICAL_SECTION cs; struct list sinks; -} SystemClockImpl; +}; -static inline SystemClockImpl *impl_from_IReferenceClock(IReferenceClock *iface) +static inline struct system_clock *impl_from_IReferenceClock(IReferenceClock *iface) { - return CONTAINING_RECORD(iface, SystemClockImpl, IReferenceClock_iface); + return CONTAINING_RECORD(iface, struct system_clock, IReferenceClock_iface); } static DWORD WINAPI SystemClockAdviseThread(void *param) { - SystemClockImpl *clock = param; + struct system_clock *clock = param; struct advise_sink *sink, *cursor; REFERENCE_TIME current_time; DWORD timeout = INFINITE; @@ -97,7 +98,7 @@ static DWORD WINAPI SystemClockAdviseThread(void *param) } } -static void notify_thread(SystemClockImpl *clock) +static void notify_thread(struct system_clock *clock) { if (!InterlockedCompareExchange(&clock->thread_created, TRUE, FALSE)) { @@ -110,7 +111,7 @@ static void notify_thread(SystemClockImpl *clock) static HRESULT WINAPI SystemClockImpl_QueryInterface(IReferenceClock *iface, REFIID iid, void **out) { - SystemClockImpl *clock = impl_from_IReferenceClock(iface); + struct system_clock *clock = impl_from_IReferenceClock(iface); TRACE("clock %p, iid %s, out %p.\n", clock, debugstr_guid(iid), out); if (IsEqualGUID(iid, &IID_IUnknown) || IsEqualGUID(iid, &IID_IReferenceClock)) @@ -127,7 +128,7 @@ static HRESULT WINAPI SystemClockImpl_QueryInterface(IReferenceClock *iface, REF static ULONG WINAPI SystemClockImpl_AddRef(IReferenceClock *iface) { - SystemClockImpl *clock = impl_from_IReferenceClock(iface); + struct system_clock *clock = impl_from_IReferenceClock(iface); ULONG refcount = InterlockedIncrement(&clock->ref); TRACE("%p increasing refcount to %u.\n", clock, refcount); @@ -137,7 +138,7 @@ static ULONG WINAPI SystemClockImpl_AddRef(IReferenceClock *iface) static ULONG WINAPI SystemClockImpl_Release(IReferenceClock *iface) { - SystemClockImpl *clock = impl_from_IReferenceClock(iface); + struct system_clock *clock = impl_from_IReferenceClock(iface); ULONG refcount = InterlockedDecrement(&clock->ref); TRACE("%p decreasing refcount to %u.\n", clock, refcount); @@ -161,7 +162,7 @@ static ULONG WINAPI SystemClockImpl_Release(IReferenceClock *iface) static HRESULT WINAPI SystemClockImpl_GetTime(IReferenceClock *iface, REFERENCE_TIME *time) { - SystemClockImpl *clock = impl_from_IReferenceClock(iface); + struct system_clock *clock = impl_from_IReferenceClock(iface); REFERENCE_TIME ret; HRESULT hr; @@ -186,7 +187,7 @@ static HRESULT WINAPI SystemClockImpl_GetTime(IReferenceClock *iface, REFERENCE_ static HRESULT WINAPI SystemClockImpl_AdviseTime(IReferenceClock *iface, REFERENCE_TIME base, REFERENCE_TIME offset, HEVENT event, DWORD_PTR *cookie) { - SystemClockImpl *clock = impl_from_IReferenceClock(iface); + struct system_clock *clock = impl_from_IReferenceClock(iface); struct advise_sink *sink; TRACE("clock %p, base %s, offset %s, event %#lx, cookie %p.\n", @@ -222,7 +223,7 @@ static HRESULT WINAPI SystemClockImpl_AdviseTime(IReferenceClock *iface, static HRESULT WINAPI SystemClockImpl_AdvisePeriodic(IReferenceClock* iface, REFERENCE_TIME start, REFERENCE_TIME period, HSEMAPHORE semaphore, DWORD_PTR *cookie) { - SystemClockImpl *clock = impl_from_IReferenceClock(iface); + struct system_clock *clock = impl_from_IReferenceClock(iface); struct advise_sink *sink; TRACE("clock %p, start %s, period %s, semaphore %#lx, cookie %p.\n", @@ -257,7 +258,7 @@ static HRESULT WINAPI SystemClockImpl_AdvisePeriodic(IReferenceClock* iface, static HRESULT WINAPI SystemClockImpl_Unadvise(IReferenceClock *iface, DWORD_PTR cookie) { - SystemClockImpl *clock = impl_from_IReferenceClock(iface); + struct system_clock *clock = impl_from_IReferenceClock(iface); struct advise_sink *sink; TRACE("clock %p, cookie %#lx.\n", clock, cookie); @@ -293,7 +294,7 @@ static const IReferenceClockVtbl SystemClock_Vtbl = HRESULT QUARTZ_CreateSystemClock(IUnknown *outer, void **out) { - SystemClockImpl *object; + struct system_clock *object; TRACE("outer %p, out %p.\n", outer, out);
1
0
0
0
Zebediah Figura : quartz/systemclock: Clean up the remaining IUnknown methods.
by Alexandre Julliard
18 Mar '19
18 Mar '19
Module: wine Branch: master Commit: 6f3238168ebad9f9955462309b4363577f6d10c1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6f3238168ebad9f995546230…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Mar 16 09:11:49 2019 -0500 quartz/systemclock: Clean up the remaining IUnknown methods. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/systemclock.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c index f22c781..1a1361c 100644 --- a/dlls/quartz/systemclock.c +++ b/dlls/quartz/systemclock.c @@ -108,29 +108,31 @@ static void notify_thread(SystemClockImpl *clock) SetEvent(clock->notify_event); } -static ULONG WINAPI SystemClockImpl_AddRef(IReferenceClock* iface) { - SystemClockImpl *This = impl_from_IReferenceClock(iface); - ULONG ref = InterlockedIncrement(&This->ref); +static HRESULT WINAPI SystemClockImpl_QueryInterface(IReferenceClock *iface, REFIID iid, void **out) +{ + SystemClockImpl *clock = impl_from_IReferenceClock(iface); + TRACE("clock %p, iid %s, out %p.\n", clock, debugstr_guid(iid), out); - TRACE("(%p): AddRef from %d\n", This, ref - 1); + if (IsEqualGUID(iid, &IID_IUnknown) || IsEqualGUID(iid, &IID_IReferenceClock)) + { + IReferenceClock_AddRef(iface); + *out = iface; + return S_OK; + } - return ref; + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); + *out = NULL; + return E_NOINTERFACE; } -static HRESULT WINAPI SystemClockImpl_QueryInterface(IReferenceClock* iface, REFIID riid, void** ppobj) { - SystemClockImpl *This = impl_from_IReferenceClock(iface); - TRACE("(%p, %s,%p)\n", This, debugstr_guid(riid), ppobj); - - if (IsEqualIID (riid, &IID_IUnknown) || - IsEqualIID (riid, &IID_IReferenceClock)) { - SystemClockImpl_AddRef(iface); - *ppobj = &This->IReferenceClock_iface; - return S_OK; - } - - *ppobj = NULL; - WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppobj); - return E_NOINTERFACE; +static ULONG WINAPI SystemClockImpl_AddRef(IReferenceClock *iface) +{ + SystemClockImpl *clock = impl_from_IReferenceClock(iface); + ULONG refcount = InterlockedIncrement(&clock->ref); + + TRACE("%p increasing refcount to %u.\n", clock, refcount); + + return refcount; } static ULONG WINAPI SystemClockImpl_Release(IReferenceClock *iface)
1
0
0
0
Zebediah Figura : quartz/systemclock: Store all the sinks in a single list.
by Alexandre Julliard
18 Mar '19
18 Mar '19
Module: wine Branch: master Commit: 1ecf2bf129ab131cf6c900880570ca591409be0a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1ecf2bf129ab131cf6c90088…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Mar 16 09:11:48 2019 -0500 quartz/systemclock: Store all the sinks in a single list. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/systemclock.c | 116 ++++++++++++++++------------------------------ 1 file changed, 39 insertions(+), 77 deletions(-) diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c index f41cdbe..f22c781 100644 --- a/dlls/quartz/systemclock.c +++ b/dlls/quartz/systemclock.c @@ -45,8 +45,7 @@ typedef struct SystemClockImpl { REFERENCE_TIME last_time; CRITICAL_SECTION cs; - /* These lists are ordered by expiration time (soonest first). */ - struct list single_sinks, periodic_sinks; + struct list sinks; } SystemClockImpl; static inline SystemClockImpl *impl_from_IReferenceClock(IReferenceClock *iface) @@ -54,73 +53,48 @@ static inline SystemClockImpl *impl_from_IReferenceClock(IReferenceClock *iface) return CONTAINING_RECORD(iface, SystemClockImpl, IReferenceClock_iface); } -static void insert_advise_sink(struct advise_sink *sink, struct list *queue) +static DWORD WINAPI SystemClockAdviseThread(void *param) { - REFERENCE_TIME due_time = sink->due_time + sink->period; - struct advise_sink *cursor; + SystemClockImpl *clock = param; + struct advise_sink *sink, *cursor; + REFERENCE_TIME current_time; + DWORD timeout = INFINITE; + HANDLE handles[2] = {clock->stop_event, clock->notify_event}; - LIST_FOR_EACH_ENTRY(cursor, queue, struct advise_sink, entry) - { - if (cursor->due_time + cursor->period > due_time) - { - list_add_before(&cursor->entry, &sink->entry); - return; - } - } - - list_add_tail(queue, &sink->entry); -} - -static DWORD WINAPI SystemClockAdviseThread(LPVOID lpParam) { - SystemClockImpl* This = lpParam; - struct advise_sink *sink, *cursor; - struct list *entry; - DWORD timeOut = INFINITE; - REFERENCE_TIME curTime; - HANDLE handles[2] = {This->stop_event, This->notify_event}; - - TRACE("(%p): Main Loop\n", This); + TRACE("Starting advise thread for clock %p.\n", clock); - while (TRUE) { - EnterCriticalSection(&This->cs); - - curTime = GetTickCount64() * 10000; - - /** First SingleShots Advice: sorted list */ - LIST_FOR_EACH_ENTRY_SAFE(sink, cursor, &This->single_sinks, struct advise_sink, entry) + for (;;) { - if (sink->due_time + sink->period > curTime) - break; + EnterCriticalSection(&clock->cs); - SetEvent(sink->handle); - list_remove(&sink->entry); - heap_free(sink); - } + current_time = GetTickCount64() * 10000; - if ((entry = list_head(&This->single_sinks))) - { - sink = LIST_ENTRY(entry, struct advise_sink, entry); - timeOut = (sink->due_time + sink->period - curTime) / 10000; - } - else timeOut = INFINITE; - - /** Now Periodics Advice: semi sorted list (sort cannot be used) */ - LIST_FOR_EACH_ENTRY(sink, &This->periodic_sinks, struct advise_sink, entry) - { - if (sink->due_time <= curTime) - { - DWORD periods = ((curTime - sink->due_time) / sink->period) + 1; - ReleaseSemaphore(sink->handle, periods, NULL); - sink->due_time += periods * sink->period; - } - timeOut = min(timeOut, (sink->due_time - curTime) / 10000); - } + LIST_FOR_EACH_ENTRY_SAFE(sink, cursor, &clock->sinks, struct advise_sink, entry) + { + if (sink->due_time <= current_time) + { + if (sink->period) + { + DWORD periods = ((current_time - sink->due_time) / sink->period) + 1; + ReleaseSemaphore(sink->handle, periods, NULL); + sink->due_time += periods * sink->period; + } + else + { + SetEvent(sink->handle); + list_remove(&sink->entry); + heap_free(sink); + } + } + + timeout = min(timeout, (sink->due_time - current_time) / 10000); + } - LeaveCriticalSection(&This->cs); + LeaveCriticalSection(&clock->cs); - if (WaitForMultipleObjects(2, handles, FALSE, timeOut) == 0) - return 0; - } + if (WaitForMultipleObjects(2, handles, FALSE, timeout) == 0) + return 0; + } } static void notify_thread(SystemClockImpl *clock) @@ -234,7 +208,7 @@ static HRESULT WINAPI SystemClockImpl_AdviseTime(IReferenceClock *iface, sink->cookie = InterlockedIncrement(&cookie_counter); EnterCriticalSection(&clock->cs); - insert_advise_sink(sink, &clock->single_sinks); + list_add_tail(&clock->sinks, &sink->entry); LeaveCriticalSection(&clock->cs); notify_thread(clock); @@ -270,7 +244,7 @@ static HRESULT WINAPI SystemClockImpl_AdvisePeriodic(IReferenceClock* iface, sink->cookie = InterlockedIncrement(&cookie_counter); EnterCriticalSection(&clock->cs); - insert_advise_sink(sink, &clock->periodic_sinks); + list_add_tail(&clock->sinks, &sink->entry); LeaveCriticalSection(&clock->cs); notify_thread(clock); @@ -288,18 +262,7 @@ static HRESULT WINAPI SystemClockImpl_Unadvise(IReferenceClock *iface, DWORD_PTR EnterCriticalSection(&clock->cs); - LIST_FOR_EACH_ENTRY(sink, &clock->single_sinks, struct advise_sink, entry) - { - if (sink->cookie == cookie) - { - list_remove(&sink->entry); - heap_free(sink); - LeaveCriticalSection(&clock->cs); - return S_OK; - } - } - - LIST_FOR_EACH_ENTRY(sink, &clock->periodic_sinks, struct advise_sink, entry) + LIST_FOR_EACH_ENTRY(sink, &clock->sinks, struct advise_sink, entry) { if (sink->cookie == cookie) { @@ -339,8 +302,7 @@ HRESULT QUARTZ_CreateSystemClock(IUnknown *outer, void **out) } object->IReferenceClock_iface.lpVtbl = &SystemClock_Vtbl; - list_init(&object->single_sinks); - list_init(&object->periodic_sinks); + list_init(&object->sinks); InitializeCriticalSection(&object->cs); object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SystemClockImpl.cs");
1
0
0
0
Zebediah Figura : quartz/systemclock: Avoid using the sink structure pointer as a cookie.
by Alexandre Julliard
18 Mar '19
18 Mar '19
Module: wine Branch: master Commit: 76e6fc92f9988acb0d3f96d8e9b7887a3e7db396 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=76e6fc92f9988acb0d3f96d8…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Mar 16 09:11:47 2019 -0500 quartz/systemclock: Avoid using the sink structure pointer as a cookie. The same pointer address may be allocated to multiple different structures. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/systemclock.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c index 0cc6d87..f41cdbe 100644 --- a/dlls/quartz/systemclock.c +++ b/dlls/quartz/systemclock.c @@ -26,11 +26,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); +static int cookie_counter; + struct advise_sink { struct list entry; HANDLE handle; REFERENCE_TIME due_time, period; + int cookie; }; typedef struct SystemClockImpl { @@ -228,6 +231,7 @@ static HRESULT WINAPI SystemClockImpl_AdviseTime(IReferenceClock *iface, sink->handle = (HANDLE)event; sink->due_time = base + offset; sink->period = 0; + sink->cookie = InterlockedIncrement(&cookie_counter); EnterCriticalSection(&clock->cs); insert_advise_sink(sink, &clock->single_sinks); @@ -235,7 +239,7 @@ static HRESULT WINAPI SystemClockImpl_AdviseTime(IReferenceClock *iface, notify_thread(clock); - *cookie = (DWORD_PTR)sink; + *cookie = sink->cookie; return S_OK; } @@ -263,6 +267,7 @@ static HRESULT WINAPI SystemClockImpl_AdvisePeriodic(IReferenceClock* iface, sink->handle = (HANDLE)semaphore; sink->due_time = start; sink->period = period; + sink->cookie = InterlockedIncrement(&cookie_counter); EnterCriticalSection(&clock->cs); insert_advise_sink(sink, &clock->periodic_sinks); @@ -270,7 +275,7 @@ static HRESULT WINAPI SystemClockImpl_AdvisePeriodic(IReferenceClock* iface, notify_thread(clock); - *cookie = (DWORD_PTR)sink; + *cookie = sink->cookie; return S_OK; } @@ -285,7 +290,7 @@ static HRESULT WINAPI SystemClockImpl_Unadvise(IReferenceClock *iface, DWORD_PTR LIST_FOR_EACH_ENTRY(sink, &clock->single_sinks, struct advise_sink, entry) { - if (sink == (struct advise_sink *)cookie) + if (sink->cookie == cookie) { list_remove(&sink->entry); heap_free(sink); @@ -296,7 +301,7 @@ static HRESULT WINAPI SystemClockImpl_Unadvise(IReferenceClock *iface, DWORD_PTR LIST_FOR_EACH_ENTRY(sink, &clock->periodic_sinks, struct advise_sink, entry) { - if (sink == (struct advise_sink *)cookie) + if (sink->cookie == cookie) { list_remove(&sink->entry); heap_free(sink);
1
0
0
0
Piotr Caban : msvcrt: Don't detect overflow in atol implementation.
by Alexandre Julliard
18 Mar '19
18 Mar '19
Module: wine Branch: master Commit: 8c1684a50a56bdafe38fa5c685f6b367f8a44bc5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8c1684a50a56bdafe38fa5c6…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sat Mar 16 14:49:08 2019 +0100 msvcrt: Don't detect overflow in atol implementation. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46845
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/string.c | 4 ++++ dlls/msvcrt/tests/string.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index f31ba60..96f67e0 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -1109,7 +1109,11 @@ MSVCRT_long CDECL MSVCRT__atol_l(const char *str, MSVCRT__locale_t locale) */ MSVCRT_long CDECL MSVCRT_atol(const char *str) { +#if _MSVCR_VER == 0 + return MSVCRT_atoi(str); +#else return MSVCRT__atol_l(str, NULL); +#endif } #if _MSVCR_VER>=120 diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index eb8e304..ff3a87d 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -3047,6 +3047,23 @@ static void test_atoi(void) ok(r == 0, "atoi(4294967296) = %d\n", r); } +static void test_atol(void) +{ + int r; + + r = atol("0"); + ok(r == 0, "atol(0) = %d\n", r); + + r = atol("-1"); + ok(r == -1, "atol(-1) = %d\n", r); + + r = atol("1"); + ok(r == 1, "atol(1) = %d\n", r); + + r = atol("4294967296"); + ok(r == 0, "atol(4294967296) = %d\n", r); +} + static void test_atof(void) { double d; @@ -3831,6 +3848,7 @@ START_TEST(string) test__stricmp(); test__wcstoi64(); test_atoi(); + test_atol(); test_atof(); test_strncpy(); test_strxfrm();
1
0
0
0
Piotr Caban : msvcrt: Fix long limits in _atol_l.
by Alexandre Julliard
18 Mar '19
18 Mar '19
Module: wine Branch: master Commit: 58140f73a27646ee57e9b6fbd395f0a0ec03b74e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=58140f73a27646ee57e9b6fb…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sat Mar 16 14:48:08 2019 +0100 msvcrt: Fix long limits in _atol_l. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/string.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index fc827d8..f31ba60 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -1094,11 +1094,11 @@ MSVCRT_long CDECL MSVCRT__atol_l(const char *str, MSVCRT__locale_t locale) { __int64 ret = MSVCRT_strtoi64_l(str, NULL, 10, locale); - if(ret > LONG_MAX) { - ret = LONG_MAX; + if(ret > MSVCRT_LONG_MAX) { + ret = MSVCRT_LONG_MAX; *MSVCRT__errno() = MSVCRT_ERANGE; - } else if(ret < LONG_MIN) { - ret = LONG_MIN; + } else if(ret < MSVCRT_LONG_MIN) { + ret = MSVCRT_LONG_MIN; *MSVCRT__errno() = MSVCRT_ERANGE; } return ret;
1
0
0
0
Michael Stefaniuc : sti/tests: Remove useless cast to self.
by Alexandre Julliard
18 Mar '19
18 Mar '19
Module: wine Branch: master Commit: cd6516eb943366dbadd80c34ad5d508b1138f7b9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cd6516eb943366dbadd80c34…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Fri Mar 15 20:37:17 2019 +0100 sti/tests: Remove useless cast to self. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/sti/tests/sti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/sti/tests/sti.c b/dlls/sti/tests/sti.c index fa4db8c..bd8b7b6 100644 --- a/dlls/sti/tests/sti.c +++ b/dlls/sti/tests/sti.c @@ -150,7 +150,7 @@ static void test_version_flag_versus_aw(void) if (SUCCEEDED(hr)) { ok(pUnknown == (IUnknown*)pStiW, "created interface was not IID_IStillImageW\n"); - IUnknown_Release((IUnknown*)pUnknown); + IUnknown_Release(pUnknown); } IUnknown_Release((IUnknown*)pStiW); }
1
0
0
0
Thomas Faber : riched20: Implement MSVC asm wrappers.
by Alexandre Julliard
18 Mar '19
18 Mar '19
Module: wine Branch: master Commit: b64511c00a5aa1896f402460a1b2de0cda957fc5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b64511c00a5aa1896f402460…
Author: Thomas Faber <thomas.faber(a)reactos.org> Date: Fri Mar 15 09:37:01 2019 +0100 riched20: Implement MSVC asm wrappers. Signed-off-by: Thomas Faber <thomas.faber(a)reactos.org> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/txthost.c | 23 +++++++++++++++++++++++ dlls/riched20/txtsrv.c | 12 ++++++++++++ 2 files changed, 35 insertions(+) diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index eaa6aae..d709502 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -502,6 +502,16 @@ DECLSPEC_HIDDEN HRESULT WINAPI ITextHostImpl_TxGetSelectionBarWidth(ITextHost *i #ifdef __i386__ /* thiscall functions are i386-specific */ #define THISCALL(func) (void *) __thiscall_ ## func +#ifdef _MSC_VER +#define DEFINE_THISCALL_WRAPPER(func,args) \ + __declspec(naked) HRESULT __thiscall_##func(void) \ + { \ + __asm pop eax \ + __asm push ecx \ + __asm push eax \ + __asm jmp func \ + } +#else /* _MSC_VER */ #define DEFINE_THISCALL_WRAPPER(func,args) \ extern HRESULT __thiscall_ ## func(void); \ __ASM_GLOBAL_FUNC(__thiscall_ ## func, \ @@ -509,6 +519,7 @@ DECLSPEC_HIDDEN HRESULT WINAPI ITextHostImpl_TxGetSelectionBarWidth(ITextHost *i "pushl %ecx\n\t" \ "pushl %eax\n\t" \ "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) ) +#endif /* _MSC_VER */ #else /* __i386__ */ @@ -560,6 +571,17 @@ DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetSelectionBarWidth,8) #ifdef __i386__ /* thiscall functions are i386-specific */ #define STDCALL(func) (void *) __stdcall_ ## func +#ifdef _MSC_VER +#define DEFINE_STDCALL_WRAPPER(num,func,args) \ + __declspec(naked) HRESULT __stdcall_##func(void) \ + { \ + __asm pop eax \ + __asm pop ecx \ + __asm push eax \ + __asm mov eax, [ecx] \ + __asm jmp dword ptr [eax + 4*num] \ + } +#else /* _MSC_VER */ #define DEFINE_STDCALL_WRAPPER(num,func,args) \ extern HRESULT __stdcall_ ## func(void); \ __ASM_GLOBAL_FUNC(__stdcall_ ## func, \ @@ -568,6 +590,7 @@ DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxGetSelectionBarWidth,8) "pushl %eax\n\t" \ "movl (%ecx), %eax\n\t" \ "jmp *(4*(" #num "))(%eax)" ) +#endif /* _MSC_VER */ DEFINE_STDCALL_WRAPPER(3,ITextHostImpl_TxGetDC,4) DEFINE_STDCALL_WRAPPER(4,ITextHostImpl_TxReleaseDC,8) diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c index 639a94f..37b866a 100644 --- a/dlls/riched20/txtsrv.c +++ b/dlls/riched20/txtsrv.c @@ -36,6 +36,16 @@ #ifdef __i386__ /* thiscall functions are i386-specific */ #define THISCALL(func) (void *) __thiscall_ ## func +#ifdef _MSC_VER +#define DEFINE_THISCALL_WRAPPER(func,args) \ + __declspec(naked) HRESULT __thiscall_##func(void) \ + { \ + __asm pop eax \ + __asm push ecx \ + __asm push eax \ + __asm jmp func \ + } +#else /* _MSC_VER */ #define DEFINE_THISCALL_WRAPPER(func,args) \ extern HRESULT __thiscall_ ## func(void); \ __ASM_GLOBAL_FUNC(__thiscall_ ## func, \ @@ -43,6 +53,8 @@ "pushl %ecx\n\t" \ "pushl %eax\n\t" \ "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) ) +#endif /* _MSC_VER */ + #else /* __i386__ */ #define THISCALL(func) func
1
0
0
0
Jacek Caban : jscript: Add Object.create implementation.
by Alexandre Julliard
18 Mar '19
18 Mar '19
Module: wine Branch: master Commit: b5058ada58587da848d37bd20436d61b646c3682 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b5058ada58587da848d37bd2…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 15 16:14:44 2019 +0100 jscript: Add Object.create implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/object.c | 41 +++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/tests/es5.js | 12 ++++++++++++ 2 files changed, 53 insertions(+) diff --git a/dlls/jscript/object.c b/dlls/jscript/object.c index c4c3a6e..19d67b5 100644 --- a/dlls/jscript/object.c +++ b/dlls/jscript/object.c @@ -32,6 +32,7 @@ static const WCHAR propertyIsEnumerableW[] = {'p','r','o','p','e','r','t','y','I','s','E','n','u','m','e','r','a','b','l','e',0}; static const WCHAR isPrototypeOfW[] = {'i','s','P','r','o','t','o','t','y','p','e','O','f',0}; +static const WCHAR createW[] = {'c','r','e','a','t','e',0}; static const WCHAR getOwnPropertyDescriptorW[] = {'g','e','t','O','w','n','P','r','o','p','e','r','t','y','D','e','s','c','r','i','p','t','o','r',0}; static const WCHAR getPrototypeOfW[] = @@ -521,6 +522,45 @@ static HRESULT Object_getOwnPropertyDescriptor(script_ctx_t *ctx, vdisp_t *jsthi return hres; } +static HRESULT Object_create(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, + unsigned argc, jsval_t *argv, jsval_t *r) +{ + jsdisp_t *proto = NULL, *obj; + HRESULT hres; + + if(!argc || (!is_object_instance(argv[0]) && !is_null(argv[0]))) { + FIXME("Invalid arg\n"); + return E_INVALIDARG; + } + + TRACE("(%s)\n", debugstr_jsval(argv[0])); + + if(argc > 1) { + FIXME("Unsupported properties argument %s\n", debugstr_jsval(argv[1])); + return E_NOTIMPL; + } + + if(argc && is_object_instance(argv[0])) { + if(get_object(argv[0])) + proto = to_jsdisp(get_object(argv[0])); + if(!proto) { + FIXME("Non-JS prototype\n"); + return E_NOTIMPL; + } + }else if(!is_null(argv[0])) { + FIXME("Invalid arg %s\n", debugstr_jsval(argc ? argv[0] : jsval_undefined())); + return E_INVALIDARG; + } + + if(r) { + hres = create_dispex(ctx, NULL, proto, &obj); + if(FAILED(hres)) + return hres; + *r = jsval_obj(obj); + } + return S_OK; +} + static HRESULT Object_getPrototypeOf(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) { @@ -547,6 +587,7 @@ static HRESULT Object_getPrototypeOf(script_ctx_t *ctx, vdisp_t *jsthis, WORD fl } static const builtin_prop_t ObjectConstr_props[] = { + {createW, Object_create, PROPF_ES5|PROPF_METHOD|2}, {definePropertiesW, Object_defineProperties, PROPF_ES5|PROPF_METHOD|2}, {definePropertyW, Object_defineProperty, PROPF_ES5|PROPF_METHOD|2}, {getOwnPropertyDescriptorW, Object_getOwnPropertyDescriptor, PROPF_ES5|PROPF_METHOD|2}, diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index 6cfee81..0ee2eff 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -637,6 +637,9 @@ function test_string_split() { } function test_getPrototypeOf() { + ok(Object.create.length === 2, "Object.create.length = " + Object.create.length); + ok(Object.getPrototypeOf.length === 1, "Object.getPrototypeOf.length = " + Object.getPrototypeOf.length); + ok(Object.getPrototypeOf(new Object()) === Object.prototype, "Object.getPrototypeOf(new Object()) !== Object.prototype"); @@ -660,6 +663,15 @@ function test_getPrototypeOf() { ok(Object.getPrototypeOf(Object.prototype) === null, "Object.getPrototypeOf(Object.prototype) !== null"); + obj = Object.create(proto = { test: 1 }); + ok(Object.getPrototypeOf(obj) === proto, + "Object.getPrototypeOf(obj) !== proto"); + ok(obj.test === 1, "obj.test = " + obj.test); + + obj = Object.create(null); + ok(!("toString" in obj), "toString is in obj"); + ok(Object.getPrototypeOf(obj) === null, "Object.getPrototypeOf(obj) = " + Object.getPrototypeOf(obj)); + next_test(); }
1
0
0
0
Francois Gouget : testbot/WineRunWineTest: Fix a typo in an error message.
by Alexandre Julliard
18 Mar '19
18 Mar '19
Module: tools Branch: master Commit: b244390ccd9e35d6ea286e66d8f9b0d5022b60ab URL:
https://source.winehq.org/git/tools.git/?a=commit;h=b244390ccd9e35d6ea286e6…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Mon Mar 18 17:00:16 2019 +0100 testbot/WineRunWineTest: Fix a typo in an error message. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/bin/WineRunWineTest.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testbot/bin/WineRunWineTest.pl b/testbot/bin/WineRunWineTest.pl index 8792be3..a74877a 100755 --- a/testbot/bin/WineRunWineTest.pl +++ b/testbot/bin/WineRunWineTest.pl @@ -423,7 +423,7 @@ if (defined $FileName) my $Dst = $Step->FileType eq "patch" ? "patch.diff" : $FileName; if (!$TA->SendFile($Step->GetFullFileName(), "staging/$Dst", 0)) { - FatalTAError($TA, "Could send '$FileName' to the VM"); + FatalTAError($TA, "Could not send '$FileName' to the VM"); } }
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
110
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Results per page:
10
25
50
100
200