Commit Graph

187 Commits

Author SHA1 Message Date
Alexandre Julliard 8c78994866 widl: Signal an error when trying to output an undefined interface into a typelib. 2010-12-08 20:32:08 +01:00
Alexandre Julliard 5d3b4fb6cb widl: Use the output buffer functions to write typelibs. 2010-11-27 11:54:51 +01:00
André Hentschel d4dc2a3a4f widl: Fix for typelib generation when unaligned access to memory is not allowed. 2010-11-15 13:20:05 +01:00
Alexandre Julliard 2debb114e3 widl: Add support for some more typelib flags based on the added attributes. 2010-10-21 21:34:33 +02:00
Alexandre Julliard a83563aa40 widl: Long constants must be 32-bit on all platforms. 2010-03-26 11:42:28 +01:00
Rob Shearman 979bdf28b6 widl: Remove func_t type.
It was just a simple indirection to get to a var_t, so just replace
all uses of it with the latter.
2010-03-23 17:28:22 +01:00
Huw Davies a6181cb3b2 tools/widl: Fix behaviour when both lcid and retval arguments are present. 2009-06-17 17:23:21 +02:00
Huw Davies 7857219ac1 widl: Fix typelib lcid fields to match those produced by midl. 2009-06-09 17:01:15 +02:00
Huw Davies 81b2c9eb85 widl: Add support for the lcid parameter attribute. 2009-06-08 15:39:14 +02:00
Alexandre Julliard b3a0833972 widl: Add support for writing 64-bit format typelibs. 2009-05-21 16:17:50 +02:00
Rob Shearman 4866026d7f widl: Move the pointer referent, array element, function return type and interface inheritance properties from type_t to details structures for the appropriate types. 2009-03-05 18:39:02 +01:00
Rob Shearman 277e0617d5 widl: Store the abstract identifier of the type in type object instead of an NDR format character. 2009-03-05 18:39:02 +01:00
Rob Shearman 7e08ff27c2 widl: Move declarray property to array_details.
Invert the property since an array being declared as a pointer is more
surprising than an array being declared as an array.

Provide an accessor, type_array_is_decl_as_ptr.
2009-03-05 16:34:00 +01:00
Rob Shearman 28a2c06cf7 widl: Use type_get_type to determine the types of types during typelib generation. 2009-02-23 15:25:47 +01:00
Alexandre Julliard ef6971da40 widl: Replace unsigned long and size_t by unsigned int where appropriate. 2009-02-06 14:54:03 +01:00
Rob Shearman bdb1321544 widl: Add a new function, type_alias_get_aliasee to wrap the retrieval of the type that the alias aliases. 2009-01-19 13:36:26 +01:00
Rob Shearman 8a976a7d78 widl: Replace uses of get_func_return_type with type_function_get_rettype.
Also replace direct accesses into the type structure to get the return
type of a function with the same function.
2009-01-06 14:36:25 +01:00
Rob Shearman 9b139018cf widl: Add new function, type_iface_get_stmts.
Use it to retrieve statements contained in interface types.
2009-01-06 12:58:41 +01:00
Rob Shearman 8fc59d0ead widl: Add a new function, type_iface_get_inherit.
Use it for retrieving the parent interface for interfaces.
2009-01-06 12:58:33 +01:00
Rob Shearman 67ac03ae4e widl: Add a new function, type_pointer_get_ref.
Use it for retrieving the type that a pointer refers to.
2009-01-06 12:58:25 +01:00
Rob Shearman 2b87d269e1 widl: Add a new function, type_array_get_element.
Use it whenever retrieving the element type of an array.
2009-01-06 12:58:13 +01:00
Rob Shearman 83b1f08117 widl: Add function for getting the interfaces defined by a coclass type.
Split out the defining of coclass types in the parser into a function.
2009-01-06 12:57:56 +01:00
Rob Shearman 1f519e17cc widl: Don't store typelib kind information in the type structure.
It can trivially be derived from the type field now.
2009-01-06 12:57:31 +01:00
Rob Shearman cb8d3322be widl: Add new type_is_alias and type_get_real_type helper functions.
Use type_is_alias to replace cumbersome "type->kind == TKIND_ALIAS" expressions.
Use type_get_real_type to simplify some code.
2009-01-06 12:56:51 +01:00
Rob Shearman 200ec53835 widl: Access array type properties through accessors instead of getting them directly.
Store array type properties in the details union to save a bit of
memory and to make the general properties more obvious.
2009-01-06 12:56:33 +01:00
Rob Shearman 901a42b7f9 widl: Move funcs and stmts fields from type_t structure to module_details and function_details. 2009-01-06 12:56:15 +01:00
Rob Shearman d2c4ff2305 widl: Add aliased types to the typelib for statements in the library block if the typedef itself doesn't need to be added.
Otherwise, the order of types in the typelib will be wrong or types
will be missing.
2009-01-03 14:55:31 +01:00
Rob Shearman 5223d04a7c widl: Write the typelib based on the statement list generated in the typelib_t object instead of using hooks in the parser code. 2008-12-29 14:46:27 +01:00
Rob Shearman 04a22cc412 widl: Hide the details of where arguments, fields, values and cases are stored in the type_t structure for functions, structures, enums and unions. 2008-12-29 14:42:47 +01:00
Rob Shearman e0dd72162a widl: Remove redundant code.
dispinterfaces now have a type of RPC_FC_IP instead of 0, so this code
will never be reached.
2008-09-11 11:45:33 +02:00
Rob Shearman 39978c68f9 widl: Fix the writing typedefs to dispinterfaces and pointers to interfaces.
Currently, stdole2.tlb isn't generated correctly and causes "<failed>"
to appear instead of "FontEvents" in the IFontEventsDisp typedef when
viewed with oleview.

The problem is that the typedef should just generate a VT_USERDEFINED
record, but ends up generating a VT_PTR -> VT_USERDEFINED. So remove
the extra writing of VT_PTR entries.

Fix the skipped pointers checks in encode_type and encode_type to
specifically detect VT_UNKNOWN and VT_DISPATCH types which don't need
one level of pointers, whereas interfaces encoded as VT_USERDEFINED
do.
2008-09-10 10:55:34 +02:00
Austin English bfc34a3c9c widl: Remove unreached code (Smatch). 2008-09-10 10:55:11 +02:00
Simon Richter b5614f763f widl: Write string lengths in host endianness.
Type libraries are currently parsed in host endianness, so byte arrays
that are going to be interpreted as integers need to be written in the
appropriate byte order.
2008-06-18 15:21:48 +02:00
Rob Shearman 80be9df3a7 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. 2008-04-28 13:28:16 +02:00
Rob Shearman 33c891e694 widl: Add support for string literals and wide-string literals in expressions. 2008-04-25 12:10:24 +02:00
Rob Shearman df0e38c067 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. 2008-04-24 22:32:20 +02:00
Rob Shearman 02f5412a53 widl: Implement lcid property on library declarations. 2008-04-24 22:31:20 +02:00
Rob Shearman f728fe168b widl: Write out TYPEFLAG, FUNCFLAG and VARFLAG flags for all attribute we currently parse.
Add FIXMEs for the remaining ones and remove the warning for 
unimplemented attribute types since we now support all the attributes 
that we parse.
2008-04-14 13:39:35 +02:00
Rob Shearman 6a0c5a4fe9 widl: Store function and function pointer types completely within type_t type. 2008-04-02 19:53:09 +02:00
Rob Shearman a04b150839 widl: Add a function to get the return type of a parsed function.
This clarifies its use in code and makes it simpler to change the way 
functions are parsed into types.
2008-04-02 19:52:49 +02:00
Michael Stefaniuc 5c9d1223db widl: Remove local variable shadowing in add_func_desc(). 2008-03-12 11:59:12 +01:00
Colin Finck 318e61535c widl: Write the TLB file in binary mode, so the line endings won't be changed. 2008-02-08 11:01:09 +01:00
Jacek Caban 2118aeca16 widl: Ignore ATTR_LOCAL in create_msft_typeinfo. 2008-02-04 11:30:30 +01:00
Paul Millar 17e934669e widl: Add support for overriding recorded time, allowing binary-identical compilation. 2007-10-29 12:08:10 +01:00
Dan Hipschman d82b384859 widl: Handle LPSTR in typelibs. 2007-08-28 11:56:30 +02:00
Jacek Caban ae0beb224b widl: Reorder switch cases to keep alphabetical order. 2007-07-30 14:12:45 +02:00
Jacek Caban 8fd9716985 widl: Added displaybind attribute handling. 2007-07-30 14:12:45 +02:00
Jacek Caban 1ad39a38e5 widl: Added nonbrowsable attribute handling. 2007-07-30 14:12:45 +02:00
Jacek Caban 4413e8c6f8 widl: Use correct bytes in write_value. 2007-07-30 14:12:45 +02:00
Misha Koshelev 21fcb00af8 widl: Add support for vararg attribute. 2007-06-07 13:00:09 +02:00
Dan Hipschman 978b4d4f4e widl: Represent arrays with type_t. 2007-06-06 12:13:16 +02:00
Dan Hipschman ef433e2792 widl: Remove var_t's ptr_level field and start write_pointers. 2007-05-11 12:33:27 +02:00
Dan Hipschman 234855f059 widl: Remove dead code in write_msft.c. 2007-05-10 12:57:06 +02:00
Dan Hipschman e7495555a0 widl: Remove redundant get_var_vt function. 2007-05-10 12:54:01 +02:00
Dan Hipschman d676d3be5f widl: Get rid of the tname field of var_t, simplify code. 2007-05-01 12:37:18 +02:00
Rob Shearman 1c2a717b59 widl: Implement writing of SAFEARRAY type descriptions in typelibs. 2007-03-07 20:10:32 +01:00
Mike McCormack 7d1e21e2c1 widl: Handle TKIND_DISPATCH when generating MSFT typelibs. 2007-01-26 14:29:18 +01:00
Huw Davies 305e4949ee widl: Don't restrict the number of params of [prop*] functions. 2007-01-26 12:22:40 +01:00
Huw Davies f994c35a3e widl: Add VT_DATE support to typelib generation. 2007-01-26 12:22:38 +01:00
Alexandre Julliard 43ac6ed995 widl: Convert expression lists to standard Wine lists.
Add a specific type for array dimensions.
2007-01-22 14:31:40 +01:00
Alexandre Julliard eed74e4e4a widl: Convert variable lists to standard Wine lists. 2007-01-22 14:26:12 +01:00
Alexandre Julliard 58827d026b widl: Convert function lists to standard Wine lists. 2007-01-22 14:23:08 +01:00
Alexandre Julliard e262933bdf widl: Convert interface lists to standard Wine lists. 2007-01-22 14:21:56 +01:00
Alexandre Julliard e998590557 widl: Convert attribute lists to standard Wine lists. 2007-01-22 14:20:36 +01:00
Alexandre Julliard 5b0bf5dc76 widl: Convert typelib lists to standard Wine lists. 2007-01-22 14:10:30 +01:00
Alexandre Julliard 5aba7b0c67 widl: Use existing functions to retrieve attributes for typelibs. 2007-01-22 14:09:46 +01:00
Andrew Talbot d3972880c0 widl: Fix memory leaks. 2007-01-04 21:14:14 +01:00
Francois Gouget 58162f87fd Assorted spelling fixes. 2006-10-13 11:55:04 +02:00
Dan Hipschman bd7e690c1f widl: Remove unused parameter in create_msft_typeinfo. 2006-09-14 11:39:37 +02:00
Dan Hipschman 48006f60a7 widl: Remove unused parameter in ctl2_encode_name. 2006-09-14 11:39:37 +02:00
Dan Hipschman aadc90b266 widl: Factor the entry_t structure. 2006-09-07 10:20:56 +02:00
Dan Hipschman c117a20cdb widl: Use type_t for typedefs, not var_t. Simplify representation. 2006-09-07 10:20:41 +02:00
Alexandre Julliard 883aef172d widl: xmalloc shouldn't initialize to zero, do that explicitly where needed. 2006-08-26 21:41:37 +02:00
Dan Hipschman 4961379d74 widl: Replace strdup, malloc and realloc with xstrdup, xmalloc and xrealloc. 2006-08-05 11:25:26 +02:00
Dan Hipschman 678ce9875f widl: Encode coclass types in typelibs. 2006-07-29 11:55:20 +02:00
Dan Hipschman c650cceae3 widl: Check if a typeinfo is already in a typelib before adding it. 2006-07-29 11:54:44 +02:00
Dan Hipschman 90cdff9b3f widl: Set typelib_idx for coclasses when they're added to a typelib. 2006-07-29 11:54:21 +02:00
Dan Hipschman c67b19b4f4 widl: Fold class_t into type_t. 2006-07-29 11:54:09 +02:00
Jacek Caban 37cf4a5260 widl: Reorder segments to match midl. 2006-07-28 12:34:27 +02:00
Jacek Caban c9a08007eb widl: Use cval in ATTR_ID. 2006-07-28 12:34:20 +02:00
Jacek Caban b86bc2b634 widl: Added ATTR_BINDABLE handling to add_func_desc. 2006-07-28 12:34:14 +02:00
Jacek Caban 4d76264f3e widl: Store typekind in msft_typeinfo_t to fix ATTR_DUAL handling. 2006-07-28 12:34:08 +02:00
Alexandre Julliard 59493b6c33 widl: Get rid of unnecessary inclusion of unicode.h. 2006-05-24 17:41:47 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Jacek Caban a7fa3a985b widl: Added support for importing parent interfaces from importlib. 2006-05-20 13:58:44 +02:00
Jacek Caban dce3f2be05 widl: Added RPC_FC_ENUM16 encoding. 2006-05-15 11:49:28 +02:00
Jacek Caban 4812abc247 widl: res50 is number of impinfos. Fix its usage. 2006-05-15 11:49:15 +02:00
Robert Shearman 555cf38269 widl: Prevent NULL pointer de-refs on "void *" types. 2006-04-20 15:16:59 +02:00
Robert Shearman 7ca82cd6d2 widl: Ignore [object] attribute on interfaces written to a typelib. 2006-04-18 16:48:39 +02:00
Mike McCormack 1d453ab551 widl: Add support for VT_I8 and VT_UI8 to msft typelibs. 2006-04-14 10:49:14 +02:00
Robert Shearman 4cd506b8fd widl: The lval member of var_t is essentially a duplicate of eval->cval.
- Generate eval's for enums that don't explicitly have one. This means
that enums written in header files won't match exactly what has been put
into the IDL file, but the numeric constat is the same and MIDL does a
similar thing.
- Replace constant lookups with eval->cval instead of lval.
2006-03-31 17:35:04 +02:00
Robert Shearman 59dd416fd2 widl: Fix a typo when removing TYPEFLAG_FDUAL. 2006-02-10 14:51:39 +01:00
Robert Shearman 91c35be7cc widl: Write out more TYPEFLAGs and add more type library-specific
attributes to the parser.
2006-02-09 12:10:08 +01:00
Robert Shearman 649d5d0e8e widl: Write out TYPEFLAG_FDUAL, TYPEFLAG_FDISPATCHABLE and
TYPEFLAG_FOLEAUTOMATION typelib flags.
2006-02-09 12:09:44 +01:00
Robert Shearman 59830d69b4 widl: Fix some warnings caused by making attributes const. 2006-02-07 16:25:10 +01:00
Robert Shearman e9ec85a01a widl: Remove unused 'rname' field of type_t. 2006-02-07 12:32:42 +01:00
Robert Shearman 2330d73f4a widl: Implement the writing of defaultvalue constants for enum values. 2006-01-31 18:04:20 +01:00
Robert Shearman 7f2419ceed widl: Add some const attributes. 2005-12-26 13:11:33 +01:00
Francois Gouget 6d442aeb34 Assorted spelling fixes. 2005-11-23 20:14:43 +01:00
Stefan Huehner f4285e68fe Fix some -Wsign-compare warnings. 2005-07-13 11:29:10 +00:00