[ros-diffs] [ekohl] 36982: WIDL: Enable the use of scalar types (non-pointer types) as custom binding handles.

ekohl at svn.reactos.org ekohl at svn.reactos.org
Sun Oct 26 13:17:37 CET 2008


Author: ekohl
Date: Sun Oct 26 07:17:36 2008
New Revision: 36982

URL: http://svn.reactos.org/svn/reactos?rev=36982&view=rev
Log:
WIDL: Enable the use of scalar types (non-pointer types) as custom binding handles.

Modified:
    trunk/reactos/tools/widl/header.c

Modified: trunk/reactos/tools/widl/header.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/header.c?rev=36982&r1=36981&r2=36982&view=diff
==============================================================================
--- trunk/reactos/tools/widl/header.c [iso-8859-1] (original)
+++ trunk/reactos/tools/widl/header.c [iso-8859-1] Sun Oct 26 07:17:36 2008
@@ -597,10 +597,18 @@
 
 const type_t* get_explicit_generic_handle_type(const var_t* var)
 {
-    const type_t *t;
-    for (t = var->type; is_ptr(t); t = t->ref)
-        if (t->type != RPC_FC_BIND_PRIMITIVE && is_attr(t->attrs, ATTR_HANDLE))
-            return t;
+    const type_t *t = var->type;
+
+    if (t->type == RPC_FC_BIND_PRIMITIVE)
+        return NULL;
+
+    if (!is_ptr(t) && is_attr(t->attrs, ATTR_HANDLE))
+        return t;
+    else
+        for (; is_ptr(t); t = t->ref)
+            if (t->type != RPC_FC_BIND_PRIMITIVE && is_attr(t->attrs, ATTR_HANDLE))
+                return t;
+
     return NULL;
 }
 



More information about the Ros-diffs mailing list