mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 15:52:57 +00:00
widl: Fix context handle "cannot be null" detection.
The "cannot be null" attibute is applied to a parameter if and only if it is in-only. widl: Fix the conditions under which array freeing code is output. It doesn't matter whether or not the array is declared as a pointer or is declared using array subscripts - the array is still allocated by the unmarshalling function and so needs to be freed. <rob at codeweavers.com> svn path=/trunk/; revision=31854
This commit is contained in:
parent
643cc20639
commit
7e4a0d01fb
1 changed files with 8 additions and 10 deletions
|
@ -2059,13 +2059,13 @@ static size_t write_contexthandle_tfs(FILE *file, const type_t *type,
|
||||||
unsigned char flags = 0x08 /* strict */;
|
unsigned char flags = 0x08 /* strict */;
|
||||||
|
|
||||||
if (is_ptr(type))
|
if (is_ptr(type))
|
||||||
{
|
|
||||||
flags |= 0x80;
|
flags |= 0x80;
|
||||||
if (type->type != RPC_FC_RP)
|
if (is_attr(var->attrs, ATTR_IN))
|
||||||
|
{
|
||||||
|
flags |= 0x40;
|
||||||
|
if (!is_attr(var->attrs, ATTR_OUT))
|
||||||
flags |= 0x01;
|
flags |= 0x01;
|
||||||
}
|
}
|
||||||
if (is_attr(var->attrs, ATTR_IN))
|
|
||||||
flags |= 0x40;
|
|
||||||
if (is_attr(var->attrs, ATTR_OUT))
|
if (is_attr(var->attrs, ATTR_OUT))
|
||||||
flags |= 0x20;
|
flags |= 0x20;
|
||||||
|
|
||||||
|
@ -2807,15 +2807,13 @@ static void write_remoting_arg(FILE *file, int indent, const func_t *func,
|
||||||
|
|
||||||
if (pointer_type != RPC_FC_RP) array_type = "Pointer";
|
if (pointer_type != RPC_FC_RP) array_type = "Pointer";
|
||||||
print_phase_function(file, indent, array_type, phase, var, start_offset);
|
print_phase_function(file, indent, array_type, phase, var, start_offset);
|
||||||
if (phase == PHASE_FREE && type->declarray && pointer_type == RPC_FC_RP)
|
if (phase == PHASE_FREE && pointer_type == RPC_FC_RP)
|
||||||
{
|
{
|
||||||
/* these are all unmarshalled by pointing into the buffer on the
|
/* these are all unmarshalled by allocating memory */
|
||||||
* server side */
|
|
||||||
if (type->type == RPC_FC_BOGUS_ARRAY ||
|
if (type->type == RPC_FC_BOGUS_ARRAY ||
|
||||||
type->type == RPC_FC_CVARRAY ||
|
type->type == RPC_FC_CVARRAY ||
|
||||||
(type->type == RPC_FC_SMVARRAY && type->type == RPC_FC_LGVARRAY && in_attr) ||
|
((type->type == RPC_FC_SMVARRAY || type->type == RPC_FC_LGVARRAY) && in_attr) ||
|
||||||
(type->type == RPC_FC_CARRAY && type->type == RPC_FC_CARRAY && !in_attr))
|
(type->type == RPC_FC_CARRAY && !in_attr)) {
|
||||||
{
|
|
||||||
print_file(file, indent, "if (%s)\n", var->name);
|
print_file(file, indent, "if (%s)\n", var->name);
|
||||||
indent++;
|
indent++;
|
||||||
print_file(file, indent, "_StubMsg.pfnFree(%s);\n", var->name);
|
print_file(file, indent, "_StubMsg.pfnFree(%s);\n", var->name);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue