]> rtime.felk.cvut.cz Git - frescor/forb.git/blobdiff - forb-idl/forb-idl-c-stubs.c
Objref deserialization is now handled the same way as for other types
[frescor/forb.git] / forb-idl / forb-idl-c-stubs.c
index 9aef1a5712124fc8cbce8be490c35db6e940b449..d9542e5980b51314fd5f7122a756866552f09756 100644 (file)
@@ -102,22 +102,16 @@ cs_output_stub (IDL_tree     tree,
                  gboolean  isSlice;
                  IDL_tree  ts = forb_cbe_get_typespec(parm);
                  int       n = oidl_param_info (ts, role, &isSlice);
-                 if (IDL_NODE_TYPE(forb_cbe_get_typespec(parm)) == IDLN_INTERFACE) {
-                         fprintf(of, "    ");
-                         forb_cbe_write_typespec(of, IDL_PARAM_DCL(parm).param_type_spec);
-                 fprintf(ci->fh, "_deserialize(req.cdr_reply, %s, _obj->orb);\n", name);
-                 } else {
-                         if (IDL_NODE_TYPE(forb_cbe_get_typespec(parm)) == IDLN_TYPE_SEQUENCE &&
-                             role == DATA_OUT) { /* Allocate out sequence */
-                                 fprintf(ci->fh, "    *%s = forb_malloc(sizeof(**%s));\n", name, name);
-                                 fprintf(ci->fh, "    if (!*%s) { ev->major = FORB_EX_NO_MEMORY; goto exception; }\n", name);
-                                 fprintf(ci->fh, "    memset(*%s, 0, sizeof(**%s));\n", name, name);
-                                 /* TODO: Free previously allocated parameters on no memory error. */
-                         }
-                         fprintf(of, "    ");
-                         forb_cbe_write_typespec(of, IDL_PARAM_DCL(parm).param_type_spec);
-                         fprintf(ci->fh, "_deserialize(req.cdr_reply, %s%s);\n", n==2?"*":"", name);
+                 if (IDL_NODE_TYPE(forb_cbe_get_typespec(parm)) == IDLN_TYPE_SEQUENCE &&
+                     role == DATA_OUT) { /* Allocate out sequence */
+                         fprintf(ci->fh, "    *%s = forb_malloc(sizeof(**%s));\n", name, name);
+                         fprintf(ci->fh, "    if (!*%s) { ev->major = FORB_EX_NO_MEMORY; goto exception; }\n", name);
+                         fprintf(ci->fh, "    memset(*%s, 0, sizeof(**%s));\n", name, name);
+                         /* TODO: Free previously allocated parameters on no memory error. */
                  }
+                 fprintf(of, "    ");
+                 forb_cbe_write_typespec(of, IDL_PARAM_DCL(parm).param_type_spec);
+                 fprintf(ci->fh, "_deserialize(req.cdr_reply, %s%s);\n", n==2?"*":"", name);
                }
        }
        fprintf(of, "    forb_request_signal_processed(&req);\n"