Alexandre Julliard : widl: Don' t call the buffer sizer routine when the size is known already.

Alexandre Julliard julliard at winehq.org
Wed May 25 11:28:12 CDT 2011


Module: wine
Branch: master
Commit: bf9d2904dc2e5d229b34b16cd614b0f2742b593a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bf9d2904dc2e5d229b34b16cd614b0f2742b593a

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue May 24 22:47:07 2011 +0200

widl: Don't call the buffer sizer routine when the size is known already.

---

 tools/widl/typegen.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 51f531d..324211e 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -3537,7 +3537,7 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const
 {
     int in_attr, out_attr, pointer_type;
     const type_t *type = var->type;
-    unsigned int start_offset = type->typestring_offset;
+    unsigned int alignment, start_offset = type->typestring_offset;
 
     if (is_ptr(type) || is_array(type))
         pointer_type = get_pointer_fc(type, var->attrs, pass != PASS_RETURN);
@@ -3562,6 +3562,8 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const
             break;
         }
 
+    if (phase == PHASE_BUFFERSIZE && get_required_buffer_size( var, &alignment, pass )) return;
+
     write_parameter_conf_or_var_exprs(file, indent, local_var_prefix, phase, var);
 
     switch (typegen_detect_type(type, var->attrs, TDT_ALL_TYPES))




More information about the wine-cvs mailing list