Alexandre Julliard : widl: Don' t allow floating point parameters for interpreted functions.

Alexandre Julliard julliard at winehq.org
Wed Jun 8 11:26:59 CDT 2011


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jun  8 13:57:41 2011 +0200

widl: Don't allow floating point parameters for interpreted functions.

---

 tools/widl/typegen.c |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 3f5847b..59de872 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -1230,14 +1230,26 @@ int is_interpreted_func( const type_t *iface, const var_t *func )
             break;
         }
     }
-    /* unions passed by value are not supported in Oi mode */
     if (get_stub_mode() != MODE_Oif && args)
+    {
         LIST_FOR_EACH_ENTRY( var, args, const var_t, entry )
-        {
-            if (type_get_type( var->type ) == TYPE_UNION ||
-                type_get_type( var->type ) == TYPE_ENCAPSULATED_UNION)
-                return 0;
-        }
+            switch (type_get_type( var->type ))
+            {
+            case TYPE_BASIC:
+                switch (type_basic_get_type( var->type ))
+                {
+                /* floating point arguments are not supported in Oi mode */
+                case TYPE_BASIC_FLOAT:  return 0;
+                case TYPE_BASIC_DOUBLE: return 0;
+                default: break;
+                }
+                break;
+            /* unions passed by value are not supported in Oi mode */
+            case TYPE_UNION: return 0;
+            case TYPE_ENCAPSULATED_UNION: return 0;
+            default: break;
+            }
+    }
 
     if ((str = get_attrp( func->attrs, ATTR_OPTIMIZE ))) return !strcmp( str, "i" );
     if ((str = get_attrp( iface->attrs, ATTR_OPTIMIZE ))) return !strcmp( str, "i" );




More information about the wine-cvs mailing list