[PATCH 1/3] jscript: implement Enumerator()
Jacek Caban
jacek at codeweavers.com
Mon Apr 29 09:50:40 CDT 2019
Hi Andreas,
On 4/24/19 10:38 PM, Andreas Maier wrote:
> Signed-off-by: Andreas Maier <staubim at quantentunnel.de>
> ---
> dlls/jscript/enumerator.c | 292 ++++++++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 280 insertions(+), 12 deletions(-)
>
> diff --git a/dlls/jscript/enumerator.c b/dlls/jscript/enumerator.c
> index aa7737ac52..9d47b70d42 100644
> --- a/dlls/jscript/enumerator.c
> +++ b/dlls/jscript/enumerator.c
> @@ -17,6 +17,7 @@
> */
>
> #include <assert.h>
> +#include <sal.h>
We don't use that in Wine. Please avoid _In_, _Out_ in Wine.
>
> #include "jscript.h"
>
> @@ -24,8 +25,23 @@
>
> WINE_DEFAULT_DEBUG_CHANNEL(jscript);
>
> +#define DATATYPE_NULL 0
> +#define DATATYPE_ARRAY 1
> +#define DATATYPE_ENUMVARIANT 2
> +
> typedef struct {
> jsdisp_t dispex;
> + int datatype;
> + BOOL atend;
> + /* constructor with jsarray e.g. ["A","B"] */
> + jsdisp_t *array;
I tested it a bit more and it looks like builtin array object also
exposes DISPID_NEWENUM (see the attached patch). It means that we don't
need to special-case it here. It should simplify the code here a lot.
I realize that adding support for DISPID_NEWENUM to builtin arrays may
be tricky, but feel free to ignore it for the first iteration. It's
probably not needed for the bug you mentioned anyway.
Thanks,
Jacek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 1386 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190429/eab97c3b/attachment.bin>
More information about the wine-devel
mailing list