" int i;\n"
" CORBA_boolean ok;\n"
" ok = CORBA_unsigned_long_deserialize(codec, &ptr->_length);\n"
- " ok = ok && (ptr->_length <= ptr->_maximum);\n"
" if (ok) {\n"
" if (CORBA_sequence_get_release(ptr)) CORBA_free(ptr->_buffer);\n"
" ptr->_buffer = %s_allocbuf(ptr->_length);\n"
char *id, *id_plain;
IDL_tree sub;
gboolean has_retval, has_args;
+ const char *const seq_init = " = {0,0,NULL}";
has_retval = IDL_OP_DCL (op).op_type_spec != NULL;
has_args = IDL_OP_DCL (op).parameter_dcls != NULL;
fprintf(ci->fh, " ");
forb_cbe_write_typespec(ci->fh, IDL_PARAM_DCL(parm).param_type_spec);
- fprintf(ci->fh, " %s%s;\n", n == 2 ? "*":"", name);
+ fprintf(ci->fh, " %s%s%s;\n",
+ n == 2 ? "*":"",
+ name,
+ (n < 2 && IDL_NODE_TYPE(ts) == IDLN_TYPE_SEQUENCE)?seq_init : "");
}
if (has_retval) {
fprintf (ci->fh, " ");
forb_cbe_write_param_typespec (ci->fh, op);
- fprintf (ci->fh, " _forb_ret;\n");
+ fprintf (ci->fh, " _forb_ret;\n"); /* TODO: seq_init */
}
/* Deserialize in parameters */