Index: ami_cs.cpp =================================================================== RCS file: /project/cvs-repository/ACE_wrappers-repository/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp,v retrieving revision 1.50 diff -u -r1.50 ami_cs.cpp --- ami_cs.cpp 19 Apr 2006 09:55:59 -0000 1.50 +++ ami_cs.cpp 24 May 2006 17:48:18 -0000 @@ -172,40 +172,53 @@ << "}" << be_uidt; } - *os << be_nl<< be_nl - << "TAO::Arg_Traits::ret_val _tao_retval;"; + // Includes the reply handler, but we have to add 1 for the retval anyway. + int nargs = ami_op->argument_count (); - // Declare the argument helper classes. - this->gen_stub_body_arglist (ami_op, os, true); + if (nargs == 1) + { + // No arguments other than the reply handler, and the return + // type is void. No need to generate argument list. - // Assemble the arg helper class pointer array. - *os << be_nl << be_nl - << "TAO::Argument *_the_tao_operation_signature [] =" << be_idt_nl - << "{" << be_idt_nl - << "&_tao_retval"; + *os << be_nl << be_nl + << "TAO::Argument ** _the_tao_operation_signature = 0;" + << be_nl; + nargs = 0; // Don't count the reply handler. + } + else + { + *os << be_nl<< be_nl + << "TAO::Arg_Traits::ret_val _tao_retval;"; - AST_Argument *arg = 0; - UTL_ScopeActiveIterator arg_list_iter (ami_op, - UTL_Scope::IK_decls); + // Declare the argument helper classes. + this->gen_stub_body_arglist (ami_op, os, true); - // For a sendc_* operation, skip the reply handler (first argument). - arg_list_iter.next (); + // Assemble the arg helper class pointer array. + *os << be_nl << be_nl + << "TAO::Argument *_the_tao_operation_signature[] =" << be_idt_nl + << "{" << be_idt_nl + << "&_tao_retval"; + + AST_Argument *arg = 0; + UTL_ScopeActiveIterator arg_list_iter (ami_op, + UTL_Scope::IK_decls); - for (; ! arg_list_iter.is_done (); arg_list_iter.next ()) - { - arg = AST_Argument::narrow_from_decl (arg_list_iter.item ()); + // For a sendc_* operation, skip the reply handler (first argument). + arg_list_iter.next (); - *os << "," << be_nl - << "&_tao_" << arg->local_name (); - } + for (; ! arg_list_iter.is_done (); arg_list_iter.next ()) + { + arg = AST_Argument::narrow_from_decl (arg_list_iter.item ()); - *os << be_uidt_nl - << "};" << be_uidt; + *os << "," << be_nl + << "&_tao_" << arg->local_name (); + } - be_interface *intf = be_interface::narrow_from_decl (parent); + *os << be_uidt_nl + << "};" << be_uidt; + } - // Includes the reply handler, but we have to add 1 for the retval anyway. - int nargs = ami_op->argument_count (); + be_interface *intf = be_interface::narrow_from_decl (parent); const char *lname = node->local_name ()->get_string (); size_t opname_len = ACE_OS::strlen (lname);