Commit Graph

187 Commits (master)

Author SHA1 Message Date
Dmitry Timoshkov 2c501aa750 widl: If a variable doesn't have a name provide an autogenerated one.
Otherwise widl crashes while generating a typelib for a structure
with an embedded anonymous union:

typedef struct _s
{
    int type;
    union
    {
        int f;
    };
} s;

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 15:04:59 +01:00
Dmitry Timoshkov 8d0f8da652 widl: Generate name for a tagless union.
Otherwise widl crashes while generating a typelib for

typedef struct _s
{
    int type;
    union
    {
        int field;
    } u;
} s;

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 15:04:59 +01:00
Zebediah Figura 56995dd322 widl: Output a registry script for all interfaces written into the typelib.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46005
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 16:22:33 +01:00
Jacek Caban d5c745e467 widl: Don't use fixed size buffer in ctl2_encode_string.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-08 23:36:54 +01:00
Jacek Caban 908c2bec28 widl: Don't use fixed size buffer in ctl2_encode_name.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-08 23:36:50 +01:00
Richard Pospesel 57f697e137 widl: Respect wire-marshal typedefs in type libraries.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47041
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 20:04:10 +02:00
Zebediah Figura 96e11d51ba widl: Write public typedefs into the typelib if they are referenced directly.
I.e. write "apple_t" into the typelib given the following snippet:

typedef [public] struct { ... } apple_t;
library {
interface IFoo {
    HRESULT a(apple_t arg);
}
}

Based on a patch by Richard Pospesel.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 20:04:01 +02:00
Zebediah Figura 4f4763ab6b widl: Handle encapsulated unions in type libraries.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 20:03:57 +02:00
Richard Pospesel e63df7f7bf widl: Store the aliasee as a decl_spec_t structure.
Signed-off-by: Richard Pospesel <richard@torproject.org>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-15 10:22:40 +02:00
Richard Pospesel 083032b5ef widl: Use type_function_get_args() instead of type_get_function_args().
Signed-off-by: Richard Pospesel <richard@torproject.org>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-14 12:15:37 +02:00
Richard Pospesel 76512154f8 widl: Refactor to have pointer type's ref use decl_spec_t rather than type_t.
Signed-off-by: Richard Pospesel <richard@torproject.org>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 10:21:07 +02:00
Richard Pospesel c7d68454af widl: Refactor to have array type's element use decl_spec_t rather than type_t.
Signed-off-by: Richard Pospesel <richard@torproject.org>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 10:21:03 +02:00
Richard Pospesel 1ffb6494db widl: Change struct _var_t's type member to a struct _decl_spec_t.
Signed-off-by: Richard Pospesel <richard@torproject.org>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 10:21:00 +02:00
Zebediah Figura 6c64d02117 widl: Correctly set the import library offset for all imported types.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47031
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-18 18:45:35 +02:00
Alexandre Julliard f67301e9ec widl: Always generate files for the target platform only.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-14 23:11:31 +01:00
Alexandre Julliard c34e245137 widl: Support generating multiple typelibs into the same resource file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-16 13:48:36 +02:00
Zebediah Figura cfab3111c2 widl: Handle typedef'd arrays.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-10 17:44:05 +02:00
Zebediah Figura 65610a4c94 widl: Fix detection of SAFEARRAY pointers when writing array pointers.
This code was introduced in 7d1e3691, but that commit did not account for
pointers to normal C arrays.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-10 17:44:02 +02:00
Jacek Caban bc6c2eb907 widl: Allow defaultvalue() attribute on any pointer type.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-24 20:12:05 +02:00
Jacek Caban 68c43a5ad9 widl: Split write_value for string and int values.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-24 20:12:05 +02:00
Zebediah Figura 50a7b239bd widl: Generate correct size and alignment for all types.
Using type_memsize_and_alignment() directly instead of reimplementing it.

Also fix the generated tests in oleaut32 to reflect correct sizes for 64-bit
typelibs.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-05 10:07:10 +02:00
Zebediah Figura d5a1d6134b widl: Prefer types defined in the same typelib to imported types.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-30 22:26:49 +02:00
Zebediah Figura 8c968f774c widl: Don't remove the FDUAL flag from non-dispatchable interfaces.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-29 17:13:05 +02:00
Zebediah Figura 413821f8b1 widl: Properly implement syntax 2 dispinterfaces.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-29 17:13:05 +02:00
Zebediah Figura 3e7a5301f2 widl: Try to import typedefs instead of redefining them.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-29 17:13:05 +02:00
Huw Davies 5a06b6b035 widl: Add missing width and alignment for VARIANT.
Spotted by André Hentschel.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-27 12:38:25 +01:00
André Hentschel 028b2bddfc widl: Initialize decoded_size.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-23 11:01:50 +01:00
Sergei Bolotov 376daa91d8 widl: Support for toggling and checking status for warnings, support for warning 2368.
Signed-off-by: Sergei Bolotov <bolotov.s.s@yandex.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-12 12:54:09 +09:00
Alexandre Julliard 87dacc4e11 widl: Disable a noisy warning.
This could be re-enabled once there's a mechanism to avoid the warning
when building the corresponding test case.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-06 01:13:40 +09:00
Dmitry Timoshkov 42c328ddf4 widl: Ignore assignment of a duplicate uuid.
MSDN KB285146 article describes this behaviour, and the tests confirm
that.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-05 20:22:36 +09:00
Dmitry Timoshkov f7581c763d widl: Avoid adding duplicate type definitions if tag and typedef names are the same.
Fix handing of the following .idl snippet:

typedef [uuid(b14b6bb5-904e-4ff9-b247-bd361f7a0001)]
struct g { int g1; } g;

[uuid(b14b6bb5-904e-4ff9-b247-bd361f7a0002)]
interface test_iface : IUnknown
{
    HRESULT test([in] g *ptr);
}

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-05 18:31:32 +09:00
Dmitry Timoshkov f16396ceec widl: Avoid warnings when being added dispatch guids already present in a typelib.
Silence warnings about adding a duplicate uuid when generating
stdole2.tlb.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-02 23:02:23 +09:00
Sebastian Lackner 736beff9c6 widl: When adding an interface typedef do check whether it has been already added while resolving the parent interface.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-02 23:02:23 +09:00
Dmitry Timoshkov e6e7055c0b widl: Add support for unions to the typelib generator.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-26 23:03:40 +09:00
Dmitry Timoshkov fb5293f0ce widl: Do not create duplicate type info entries when tag and typedef names are the same.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2015-10-06 14:28:23 +09:00
Dmitry Timoshkov 7d1e3691ab widl: Add special handling for pointers to arrays in the typelib generator. 2015-09-10 17:22:43 +09:00
André Hentschel 04a9c94250 widl: Remove unused initializer (Clang). 2015-07-22 07:23:47 +02:00
Francois Gouget 8a63982f73 widl: Remove unneeded NONAMELESSXXX directives. 2015-04-03 11:22:06 +09:00
Nikolay Sivov ea9e7b6318 widl: Fix default value types. 2014-03-18 11:40:08 +01:00
Nikolay Sivov 826980d7f4 widl: Fix duplicate typeinfo being written to typelib for enums. 2014-03-11 10:28:46 +01:00
Nikolay Sivov c46debeeeb widl: Fix pointer size for SYS_WIN64 typelibs.
The fact that test data was wrong was hidden by broken widl typelib,
and same test typelib was used on windows so we never get proper test
results. Standard IUnknown/IDispatch that live in system stdole2.tlb
are also tested now.
2014-01-27 14:13:54 +01:00
Alexandre Julliard cc02e15220 widl: Add support for #pragma directives. 2013-11-04 17:41:11 +01:00
Jacek Caban 2510ec477b widl: Increase version number stored in custom data. 2013-08-29 19:56:18 +02:00
Jacek Caban 0277512350 widl: Include string info in tlb custom data. 2013-08-29 19:56:18 +02:00
Piotr Caban 3d9454bc8f widl: Make it possible to set typelib resource id with id attribute. 2013-01-18 13:29:09 +01:00
Austin English ecfb6539f6 widl: add_interface_typeinfo should not return a value. 2012-12-20 12:01:08 +01:00
Alexandre Julliard 4ff0faa67c widl: Generate a registration script along with the typelib when creating a resource file. 2011-08-02 20:47:48 +02:00
Alexandre Julliard b568287eef widl: Add support for generating typelibs directly in resource format. 2011-08-01 21:38:56 +02:00
Marcus Meissner 37046546af oleaut32: Fixed offset calculation (Coverity). 2011-05-09 10:50:27 +02:00
Alexandre Julliard cb246ca7a7 widl: Support encoding the DECIMAL type in typelibs. 2010-12-09 00:05:28 +01:00