]> rtime.felk.cvut.cz Git - frescor/forb.git/blobdiff - forb-idl/forb-idl-c-skels.c
forb: Split forb_port_destroy() to stop and destroy phases
[frescor/forb.git] / forb-idl / forb-idl-c-skels.c
index 096cdd998d86bdd0415696e8e5c4e463a479c9e5..1d353381e186063ebbb45c5c500effff1a711774 100644 (file)
@@ -276,7 +276,7 @@ static void ck_output_op_skel(IDL_tree op, char *intf_id, OIDL_Run_Info *rinfo,
        id = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(IDL_OP_DCL(op).ident), "_", 0);
        id_plain = IDL_IDENT(IDL_OP_DCL(op).ident).str;
        fprintf(ci->fh, "static void\n"
-               "forb_skel_%s(CDR_Codec *cin, CDR_Codec *cout, %s _obj, struct forb_env *env)\n"
+               "forb_skel_%s(FORB_CDR_Codec *cin, FORB_CDR_Codec *cout, %s _obj, struct forb_env *env)\n"
                "{\n",
                id, intf_id);
 /*     fprintf(ci->fh, "  if (_obj->interface != %s_interface) {\n", intf_id); */
@@ -316,10 +316,10 @@ static void ck_output_op_skel(IDL_tree op, char *intf_id, OIDL_Run_Info *rinfo,
                role = oidl_attr_to_paramrole(IDL_PARAM_DCL(parm).attr);
                if (role == DATA_IN || role == DATA_INOUT) {
                        char *name = IDL_IDENT(IDL_PARAM_DCL(parm).simple_declarator).str;
-                       fprintf(ci->fh, /* "  r = " */ "    ");
+                       fprintf(ci->fh, "    if (!");
                        forb_cbe_write_typespec(ci->fh, IDL_PARAM_DCL(parm).param_type_spec);
-                       fprintf(ci->fh, "_deserialize(cin, &%s);\n", name);
-/*                     fprintf(ci->fh, "    if (!r) { ev->major = FORB_EX_IMP_LIMIT; goto exception; }\n"); */
+                       fprintf(ci->fh, "_deserialize(cin, &%s)) {\n", name);
+                       fprintf(ci->fh, "      env->major = FORB_EX_MARSHAL; goto exception;\n    }\n");
                }
        }