widl: Out parameters.

Marshall and unmarshall out parameters for servers and clients
respectively.
Write out array components for declared local variables in generated
server code.
This commit is contained in:
Robert Shearman 2005-12-26 13:21:38 +01:00 committed by Alexandre Julliard
parent e0dd7b6ed8
commit 4acabfd719
4 changed files with 7 additions and 1 deletions

View File

@ -210,6 +210,8 @@ static void write_function_stubs(type_t *iface)
print_client("_StubMsg.BufferStart = (unsigned char *)_RpcMessage.Buffer;\n");
print_client("_StubMsg.BufferEnd = _StubMsg.BufferStart + _RpcMessage.BufferLength;\n\n");
unmarshall_arguments(client, indent, func, &type_offset, PASS_OUT);
/* unmarshal return value */
if (!is_void(def->type, NULL))
{

View File

@ -115,7 +115,7 @@ const char* get_name(const var_t *v)
return v->name;
}
static void write_array(FILE *h, const expr_t *v, int field)
void write_array(FILE *h, const expr_t *v, int field)
{
if (!v) return;
while (NEXT_LINK(v)) v = NEXT_LINK(v);

View File

@ -32,6 +32,7 @@ extern int is_object(attr_t *a);
extern int is_local(attr_t *a);
extern var_t *is_callas(attr_t *a);
extern void write_args(FILE *h, var_t *arg, const char *name, int obj, int do_indent);
extern void write_array(FILE *h, const expr_t *v, int field);
extern void write_forward(type_t *iface);
extern void write_interface(type_t *iface);
extern void write_dispinterface(type_t *iface);

View File

@ -153,6 +153,7 @@ static void write_function_stubs(type_t *iface)
write_type(server, var->type, var, var->tname);
fprintf(server, " ");
write_name(server, var);
write_array(server, var->array, 0);
fprintf(server, ";\n");
var = PREV_LINK(var);
@ -293,6 +294,8 @@ static void write_function_stubs(type_t *iface)
fprintf(server, "\n");
}
marshall_arguments(server, indent, func, &type_offset, PASS_OUT);
/* marshall the return value */
if (!is_void(def->type, NULL))
{