fullname = forb_cbe_get_typespec_str(tree);
fprintf(ci->fh, "#if !defined(FORB_DECL_%s) && !defined(_%s_defined)\n#define FORB_DECL_%s 1\n#define _%s_defined 1\n", fullname, fullname, fullname, fullname);
-/* if ( tree->declspec & IDLF_DECLSPEC_PIDL ) { */
-/* /\* PIDL interfaces are not normal CORBA Objects *\/ */
+ if ( tree->declspec & IDLF_DECLSPEC_PIDL ) {
+ /* PIDL interfaces are not normal CORBA Objects */
+ fprintf(ci->fh, "// PIDL: %s\n", fullname);
/* fprintf(ci->fh, "typedef struct %s_type *%s;\n", fullname, fullname); */
/* fprintf(ci->fh, "#ifndef TC_%s\n", fullname); */
/* fprintf(ci->fh, "# define TC_%s TC_CORBA_Object\n", fullname); */
/* fprintf(ci->fh, "#endif\n"); */
-/* } else { */
+ } else {
/* fprintf(ci->fh, "#define %s__freekids CORBA_Object__freekids\n", fullname); */
fprintf(ci->fh, "typedef forb_object %s;\n", fullname);
fullname, fullname, fullname);
/* ch_type_alloc_and_tc(tree, rinfo, ci, FALSE); */
-/* } */
+ }
- fprintf(ci->fh, "#endif\n");
+ fprintf(ci->fh, "#endif\n\n");
g_free(fullname);
}
" CDR_Codec codec;\n"
" forb_request_handle_t req;\n"
" CDR_codec_init_static(&codec);\n"
- " ex_on_fail(CDR_buffer_init(&codec, 256), FORB_EX_NO_MEMORY);\n");
+ " ex_on_fail(CDR_buffer_init(&codec, 256, FORB_REQEST_HDR_SIZE), FORB_EX_NO_MEMORY);\n");
/* fprintf(of, " forb_prepare_request(&codec, _obj, FORB_METHOD_INDEX(%s));\n", */
/* opname); */
for (sub = IDL_OP_DCL (tree).parameter_dcls; sub; sub = IDL_LIST (sub).next) {
case IDLN_INTERFACE: {
int real_idx = 0;
char *id;
- id = IDL_ns_ident_to_qstring (IDL_INTERFACE (tree).ident, "_", 0);
- fprintf(ci->fh, "#define _%s_impl(obj) ((struct forb_%s_impl*)(obj)->implementation)\n\n",
- id, id);
- g_free(id);
- cs_output_stubs (IDL_INTERFACE (tree).body, ci, &real_idx);
+ /* Do not output skeletons for PIDL interfaces */
+ if ((tree->declspec & IDLF_DECLSPEC_PIDL) == 0) {
+ id = IDL_ns_ident_to_qstring (IDL_INTERFACE (tree).ident, "_", 0);
+ fprintf(ci->fh, "#define _%s_impl(obj) ((struct forb_%s_impl*)(obj)->implementation)\n\n",
+ id, id);
+ g_free(id);
+ cs_output_stubs (IDL_INTERFACE (tree).body, ci, &real_idx);
+ }
break;
}
case IDLN_OP_DCL:
fprintf (ci->fh, OIDL_C_WARNING);
fprintf (ci->fh, "#include <string.h>\n");
/* fprintf (ci->fh, "#define FORB2_STUBS_API\n"); */
+ fprintf (ci->fh, "#include <forb/forb-idl.h>\n");
fprintf (ci->fh, "#include \"%s.h\"\n\n", ci->base_name);
- fprintf (ci->fh, "#define ex_on_fail(command, ex) if (!(command)) do { ev->major = (ex); goto exception; } while(0)\n\n");
+ fprintf (ci->fh, "#define ex_on_fail(command, ex) if (!(command)) do { ev->major = (ex); goto exception; } while(0)\n");
+ fprintf (ci->fh, "#define FORB_REQEST_HDR_SIZE (forb_iop_MESSAGE_HEADER_SIZE + forb_iop_REQUEST_HEADER_SIZE)\n\n");
cs_output_stubs (tree, ci, NULL);
}