Commit 73dff5c4 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

widl: Prepare marshall and unmarshall code generation functions for

accepting pointers.
parent 86c3a2e7
......@@ -283,8 +283,6 @@ unsigned int get_required_buffer_size(type_t *type)
void marshall_arguments(FILE *file, int indent, func_t *func)
{
unsigned int alignment;
unsigned int size;
unsigned int last_size = 0;
var_t *var;
......@@ -295,7 +293,10 @@ void marshall_arguments(FILE *file, int indent, func_t *func)
while (NEXT_LINK(var)) var = NEXT_LINK(var);
while (var)
{
alignment = 0;
if (var->ptr_level == 0)
{
unsigned int size;
unsigned int alignment = 0;
switch (var->type->type)
{
case RPC_FC_BYTE:
......@@ -349,6 +350,12 @@ void marshall_arguments(FILE *file, int indent, func_t *func)
fprintf(file, "\n");
last_size = size;
}
else
{
error("marshall_arguments: Pointer level %d not supported for variable %s\n", var->ptr_level, var->name);
last_size = 0;
}
var = PREV_LINK(var);
}
......@@ -356,8 +363,6 @@ void marshall_arguments(FILE *file, int indent, func_t *func)
void unmarshall_arguments(FILE *file, int indent, func_t *func)
{
unsigned int alignment;
unsigned int size;
unsigned int last_size = 0;
var_t *var;
......@@ -368,7 +373,11 @@ void unmarshall_arguments(FILE *file, int indent, func_t *func)
while (NEXT_LINK(var)) var = NEXT_LINK(var);
while (var)
{
alignment = 0;
if (var->ptr_level == 0)
{
unsigned int size;
unsigned int alignment = 0;
switch (var->type->type)
{
case RPC_FC_BYTE:
......@@ -422,6 +431,12 @@ void unmarshall_arguments(FILE *file, int indent, func_t *func)
fprintf(file, "\n");
last_size = size;
}
else
{
error("unmarshall_arguments: Pointer level %d not supported for variable %s\n", var->ptr_level, var->name);
last_size = 0;
}
var = PREV_LINK(var);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment