[PATCH 0/1] MR6342: wscript: Implement Sleep
From: Anders Kjersem <andersdev(a)proton.me> --- programs/wscript/host.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/programs/wscript/host.c b/programs/wscript/host.c index 44336deac13..6bec73062e2 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -395,8 +395,10 @@ static HRESULT WINAPI Host_DisconnectObject(IHost *iface, IDispatch *Object) static HRESULT WINAPI Host_Sleep(IHost *iface, LONG Time) { - WINE_FIXME("(%ld)\n", Time); - return E_NOTIMPL; + if (Time < 0) + return E_INVALIDARG; + Sleep(Time); + return S_OK; } static HRESULT WINAPI Host_ConnectObject(IHost *iface, IDispatch *Object, BSTR Prefix) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6342
Jacek Caban (@jacek) commented about programs/wscript/host.c:
static HRESULT WINAPI Host_Sleep(IHost *iface, LONG Time) { - WINE_FIXME("(%ld)\n", Time);
Please change it to `TRACE()` instead of removing. This makes debugging things easier. The implementation looks good, but it would be nice to have a test, see `tests/run.js`. Something like a simple `Sleep(0)` call and maybe a check that negative values throw an exception (see existing try..catch tests for an example). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6342#note_79649
participants (3)
-
Anders Kjersem -
Anders Kjersem (@anders) -
Jacek Caban (@jacek)