mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
Support size_is(*Length) attributes for strings.
svn path=/trunk/; revision=17158
This commit is contained in:
parent
9a462169de
commit
6ab29bbd4b
2 changed files with 21 additions and 3 deletions
|
@ -1,5 +1,11 @@
|
||||||
ChangeLog
|
ChangeLog
|
||||||
|
|
||||||
|
2005-08-07 ekohl
|
||||||
|
|
||||||
|
tools/widl/server.c
|
||||||
|
|
||||||
|
- Support size_is(*Length) attributes for strings.
|
||||||
|
|
||||||
2005-07-30 ekohl
|
2005-07-30 ekohl
|
||||||
|
|
||||||
tools/widl/client.c
|
tools/widl/client.c
|
||||||
|
|
|
@ -833,7 +833,11 @@ static void print_message_buffer_size(func_t *func, unsigned int *type_offset)
|
||||||
var->type->type == RPC_FC_CHAR ||
|
var->type->type == RPC_FC_CHAR ||
|
||||||
var->type->type == RPC_FC_WCHAR)
|
var->type->type == RPC_FC_WCHAR)
|
||||||
{
|
{
|
||||||
|
if (((var_t *)sizeis_attr)->ptr_level == 0)
|
||||||
print_server("_StubMsg.MaxCount = %s;\n", ((var_t *)sizeis_attr)->name);
|
print_server("_StubMsg.MaxCount = %s;\n", ((var_t *)sizeis_attr)->name);
|
||||||
|
else
|
||||||
|
print_server("_StubMsg.MaxCount = %s ? *%s : 0;\n",
|
||||||
|
((var_t *)sizeis_attr)->name, ((var_t *)sizeis_attr)->name);
|
||||||
fprintf(server, "\n");
|
fprintf(server, "\n");
|
||||||
print_server("NdrConformantStringBufferSize(\n");
|
print_server("NdrConformantStringBufferSize(\n");
|
||||||
indent++;
|
indent++;
|
||||||
|
@ -1232,7 +1236,11 @@ static void marshall_out_arguments(func_t *func, unsigned int *type_offset)
|
||||||
if (string_attr)
|
if (string_attr)
|
||||||
{
|
{
|
||||||
fprintf(server, "\n");
|
fprintf(server, "\n");
|
||||||
|
if (((var_t *)sizeis_attr)->ptr_level == 0)
|
||||||
print_server("_StubMsg.MaxCount = %s;\n", ((var_t *)sizeis_attr)->name);
|
print_server("_StubMsg.MaxCount = %s;\n", ((var_t *)sizeis_attr)->name);
|
||||||
|
else
|
||||||
|
print_server("_StubMsg.MaxCount = %s ? *%s : 0;\n",
|
||||||
|
((var_t *)sizeis_attr)->name, ((var_t *)sizeis_attr)->name);
|
||||||
fprintf(server, "\n");
|
fprintf(server, "\n");
|
||||||
print_server("NdrConformantStringMarshall(\n");
|
print_server("NdrConformantStringMarshall(\n");
|
||||||
indent++;
|
indent++;
|
||||||
|
@ -1452,7 +1460,11 @@ static void cleanup_return_buffer(func_t *func, unsigned int *type_offset)
|
||||||
indent++;
|
indent++;
|
||||||
if (string_attr)
|
if (string_attr)
|
||||||
{
|
{
|
||||||
|
if (((var_t *)sizeis_attr)->ptr_level == 0)
|
||||||
print_server("_StubMsg.MaxCount = %s;\n", ((var_t *)sizeis_attr)->name);
|
print_server("_StubMsg.MaxCount = %s;\n", ((var_t *)sizeis_attr)->name);
|
||||||
|
else
|
||||||
|
print_server("_StubMsg.MaxCount = %s ? *%s : 0;\n",
|
||||||
|
((var_t *)sizeis_attr)->name, ((var_t *)sizeis_attr)->name);
|
||||||
fprintf(server, "\n");
|
fprintf(server, "\n");
|
||||||
print_server("NdrPointerFree(\n");
|
print_server("NdrPointerFree(\n");
|
||||||
indent++;
|
indent++;
|
||||||
|
|
Loading…
Reference in a new issue