Huw Davies
69091ef569
widl: Store the pointer description in the type rather than base type so that it gets re-written when the type is re-written.
2009-08-04 13:50:07 +02:00
Alexandre Julliard
f21eab1101
widl: Take into account the alignment of conformant arrays to pad a structure.
2009-07-13 09:23:06 +02:00
Alexandre Julliard
d375d25d65
widl: An ENUM16 is 32-bit wide in memory.
2009-07-03 13:06:14 +02:00
Alexandre Julliard
f6d2b49145
widl: Take into account structure field alignment when computing offsets.
2009-07-03 13:05:52 +02:00
Alexandre Julliard
064775c9a0
widl: Struct alignment should be the largest alignment of all the struct members.
2009-07-03 13:05:52 +02:00
Alexandre Julliard
fc7681a8ce
widl: Skip the existing correlation descriptor on unencapsulated unions when generating a different one.
2009-07-03 13:05:52 +02:00
Alexandre Julliard
c152b4e7d1
include: Add a target address for unwinding for platforms that need it.
2009-06-18 15:17:26 +02:00
Rob Shearman
d38cc9acbc
widl: Initialise ref pointers to basic and enum types to 0 in generated server code.
...
Previously it was only done for pointers.
2009-03-23 14:23:19 +01:00
Rob Shearman
48a5db074b
widl: Output correct code for freeing of conformant-sized and non-conformant strings.
...
_StubMsg.pfnFree should be used instead of NdrPointerFree for
conformant-sized strings since the buffer will have been allocated
using NdrAllocate.
Non-conformant strings do not need any freeing since they use a buffer
that is allocated on the stack.
2009-03-23 14:22:41 +01:00
Rob Shearman
8cdda26897
widl: Returned pointers should default to being unique, not reference.
2009-03-11 10:29:20 +01:00
Rob Shearman
728a738a82
widl: Move type_basic_get_fc to typegen.c and rename it to get_basic_fc.
...
Move to using type_basic_get_type in other files where appropriate.
2009-03-09 12:14:35 +01:00
Rob Shearman
630b48941f
widl: Fix a memory leak in the server/stub code when unmarshalling pointers to strings at the top level.
...
It is necessary for the first pointer to have an offset to a second
pointer instead of directly to the string type, since the second
pointer frees the memory for the string.
2009-03-09 12:13:53 +01:00
Rob Shearman
f170f9b5d5
widl: Output server code for freeing returned types.
2009-03-09 12:12:57 +01:00
Rob Shearman
23673ca373
widl: Determine pointer fc at generation time instead of at parse time.
...
Avoid changing the details of a pointer once created.
Properly determine the pointer type for arrays.
2009-03-09 12:09:39 +01:00
Rob Shearman
f8e36ab4ab
widl: Consolidate non-simple pointer writing into one function.
2009-03-09 12:08:57 +01:00
Rob Shearman
a8238dd142
widl: Pass var attrs into write_no_repeat_pointer_descriptions and use them for the string check.
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
2c6e611c8a
widl: Add typegen_detect_type and use it.
...
Add typegen_detect_type for detecting types useful during
client/server/proxy code generation.
2009-02-23 15:25:57 +01:00
Rob Shearman
af0800729b
widl: Use type_get_type to determine the types of types during C client, server and proxy code generation.
2009-02-23 15:25:53 +01:00
Rob Shearman
fb934347b4
widl: Use type_get_type to determine the types during statement enumeration.
2009-02-23 15:25:20 +01:00
Rob Shearman
944f22db80
widl: Fix typos in write_remoting_arg which caused ref pointers to unions to not result in direct calls to NonEncapsulatedUnion/EncapsulatedUnion functions.
2009-02-19 12:51:40 +01:00
Rob Shearman
04484a4013
widl: Call Pointer function for freeing non-conformant strings and for all phases for returned non-conformant strings, as is done for conformant strings.
...
Also call Pointer functions for any string that isn't a reference pointer.
2009-02-16 15:35:14 +01:00
Rob Shearman
e054c52cd1
widl: Call Struct and Union phase functions for reference pointers to structures and unions.
...
It's slightly quicker than calling pointer phase functions and does
the same job.
2009-02-16 15:35:14 +01:00
Rob Shearman
47c82ac472
widl: Fix marshalling/unmarshalling of enum arguments.
...
The generated code should use NdrSimpleType{Marshall,Unmarshall} instead
of direct buffer access, since the memory size isn't always equal to
the size on the wire and extra checks.
2009-02-16 15:35:14 +01:00
Alexandre Julliard
20e4cb98a7
widl: Change write_type_def_or_decl and write_type_decl to take an argument name instead of a printf format.
2009-02-10 12:32:36 +01:00
Alexandre Julliard
25624b677d
widl: Print all NdrFcShort parameters as shorts to avoid warnings for negative values.
2009-02-06 14:54:03 +01:00
Alexandre Julliard
fcc096083f
widl: Add printf format attribute on all printf-like functions and fix resulting warnings.
2009-02-06 14:54:03 +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
Alexandre Julliard
844c8a1804
widl: Add a dummy reference to the filter function to avoid a warning.
2009-02-06 14:54:02 +01:00
Alexandre Julliard
a0fb6246c0
widl: Avoid using GetExceptionCode outside of an exception handler.
2009-02-06 14:54:02 +01:00
Alexandre Julliard
d02f9d1804
widl: We need an offset after the correlation descriptor for unencapsulated unions.
2009-01-23 16:47:51 +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
Michael Karcher
f80e4aa9d2
widl: Don't forget conformance info on [iid_is] void pointers.
2009-01-12 16:53:18 +01:00
Michael Stefaniuc
9192297345
widl: Move "inline" right after the storage class specifier.
2009-01-10 17:43:11 +01:00
Michael Karcher
656de48e4e
widl: Write struct fields as signed fields.
2009-01-08 14:11:35 +01:00
Michael Karcher
5f7886925d
widl: Make write_base_type take a format char instead of a type desc ptr.
2009-01-08 14:05:00 +01:00
Rob Shearman
77228b52e6
widl: Determine the type of an array entirely at code generation time instead of at parse time.
...
Previously, this was done partially (for fixed array types only).
2009-01-07 12:27:14 +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
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
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
10a422ae14
widl: Use is_string_type instead of is_attr(..., ATTR_STRING) for detecting strings.
...
Detecting strings is a bit harder than just looking for the string
attribute, so make sure to use the function which has the purpose of
doing just that.
Fixes compilation of generated server/proxy code when a parameter has
both the [out] and [string] attributes.
2009-01-02 14:27:43 +01:00
Rob Shearman
36c03f6a94
widl: Remove duplicate pointer handling code in get_struct_type.
...
Only make the structure complex if there is an interface pointer, not
if there is a pointer to a union or complex struct since these are
handled perfectly well by the pointer marshalling code.
Fix the detection of structures with ref-pointers or pointers in 64-bit code.
2008-12-31 12:35:49 +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
2e0aefc1fd
widl: Structures and arrays with pointers should be complex when generating code for 64-bit platforms.
...
The non-complex variants depend on the wire size of the
structure/array matching the buffer size, but this no longer applies
when pointers are 8 bytes instead of 4.
2008-12-27 20:23:19 +01:00
Alexandre Julliard
53626dbd93
widl: Add support for generating 32-bit and/or 64-bit code for proxies/clients/servers.
2008-12-26 17:22:25 +01:00