Index: CORBA/MICO/MICO.xs diff -c CORBA/MICO/MICO.xs:1.1.1.1 CORBA/MICO/MICO.xs:1.4 *** CORBA/MICO/MICO.xs:1.1.1.1 Thu Feb 8 12:40:59 2001 --- CORBA/MICO/MICO.xs Mon Feb 19 13:07:25 2001 *************** *** 199,207 **** argc = av_len(ARGV)+2; argv = (char **)malloc (sizeof(char *)*argc); ! argv[0] = SvPV (ARGV0, na); for (i=0;i<=av_len(ARGV);i++) ! argv[i+1] = SvPV(*av_fetch(ARGV, i, 0), na); RETVAL = CORBA::ORB_init (argc, argv, id); --- 199,207 ---- argc = av_len(ARGV)+2; argv = (char **)malloc (sizeof(char *)*argc); ! argv[0] = SvPV (ARGV0, PL_na); for (i=0;i<=av_len(ARGV);i++) ! argv[i+1] = SvPV(*av_fetch(ARGV, i, 0), PL_na); RETVAL = CORBA::ORB_init (argc, argv, id); *************** *** 225,231 **** SV *value CODE: RETVAL = new CORBA::Any; ! RETVAL->type(type); if (!pmico_to_any (RETVAL, value)) { delete RETVAL; croak("Error constructing Any"); --- 225,231 ---- SV *value CODE: RETVAL = new CORBA::Any; ! RETVAL->set_type(type); if (!pmico_to_any (RETVAL, value)) { delete RETVAL; croak("Error constructing Any"); *************** *** 662,668 **** RETVAL SV * ! stringify (self, other=0, reverse=&sv_undef) CORBA::LongLong self CODE: { --- 662,668 ---- RETVAL SV * ! stringify (self, other=0, reverse=&PL_sv_undef) CORBA::LongLong self CODE: { *************** *** 674,680 **** RETVAL CORBA::LongLong ! add (self, other, reverse=&sv_undef) CORBA::LongLong self CORBA::LongLong other CODE: --- 674,680 ---- RETVAL CORBA::LongLong ! add (self, other, reverse=&PL_sv_undef) CORBA::LongLong self CORBA::LongLong other CODE: *************** *** 683,689 **** RETVAL CORBA::LongLong ! subtract (self, other, reverse=&sv_undef) CORBA::LongLong self CORBA::LongLong other SV *reverse --- 683,689 ---- RETVAL CORBA::LongLong ! subtract (self, other, reverse=&PL_sv_undef) CORBA::LongLong self CORBA::LongLong other SV *reverse *************** *** 696,702 **** RETVAL CORBA::LongLong ! div (self, other, reverse=&sv_undef) CORBA::LongLong self CORBA::LongLong other SV *reverse --- 696,702 ---- RETVAL CORBA::LongLong ! div (self, other, reverse=&PL_sv_undef) CORBA::LongLong self CORBA::LongLong other SV *reverse *************** *** 709,715 **** RETVAL CORBA::LongLong ! mul (self, other, reverse=&sv_undef) CORBA::LongLong self CORBA::LongLong other CODE: --- 709,715 ---- RETVAL CORBA::LongLong ! mul (self, other, reverse=&PL_sv_undef) CORBA::LongLong self CORBA::LongLong other CODE: *************** *** 718,724 **** RETVAL CORBA::LongLong ! mod (self, other, reverse=&sv_undef) CORBA::LongLong self CORBA::LongLong other SV *reverse --- 718,724 ---- RETVAL CORBA::LongLong ! mod (self, other, reverse=&PL_sv_undef) CORBA::LongLong self CORBA::LongLong other SV *reverse *************** *** 731,737 **** RETVAL CORBA::LongLong ! neg (self, other=0, reverse=&sv_undef) CORBA::LongLong self CODE: RETVAL = -self; --- 731,737 ---- RETVAL CORBA::LongLong ! neg (self, other=0, reverse=&PL_sv_undef) CORBA::LongLong self CODE: RETVAL = -self; *************** *** 739,745 **** RETVAL CORBA::LongLong ! abs (self, other=0, reverse=&sv_undef) CORBA::LongLong self CODE: RETVAL = (self > 0) ? self : -self; --- 739,745 ---- RETVAL CORBA::LongLong ! abs (self, other=0, reverse=&PL_sv_undef) CORBA::LongLong self CODE: RETVAL = (self > 0) ? self : -self; *************** *** 747,753 **** RETVAL int ! cmp (self, other, reverse=&sv_undef) CORBA::LongLong self CORBA::LongLong other SV *reverse --- 747,753 ---- RETVAL int ! cmp (self, other, reverse=&PL_sv_undef) CORBA::LongLong self CORBA::LongLong other SV *reverse *************** *** 770,776 **** RETVAL SV * ! stringify (self, other=0, reverse=&sv_undef) CORBA::ULongLong self CODE: { --- 770,776 ---- RETVAL SV * ! stringify (self, other=0, reverse=&PL_sv_undef) CORBA::ULongLong self CODE: { *************** *** 782,788 **** RETVAL CORBA::ULongLong ! add (self, other, reverse=&sv_undef) CORBA::ULongLong self CORBA::ULongLong other CODE: --- 782,788 ---- RETVAL CORBA::ULongLong ! add (self, other, reverse=&PL_sv_undef) CORBA::ULongLong self CORBA::ULongLong other CODE: *************** *** 791,797 **** RETVAL CORBA::ULongLong ! subtract (self, other, reverse=&sv_undef) CORBA::ULongLong self CORBA::ULongLong other SV *reverse --- 791,797 ---- RETVAL CORBA::ULongLong ! subtract (self, other, reverse=&PL_sv_undef) CORBA::ULongLong self CORBA::ULongLong other SV *reverse *************** *** 804,810 **** RETVAL CORBA::ULongLong ! div (self, other, reverse=&sv_undef) CORBA::ULongLong self CORBA::ULongLong other SV *reverse --- 804,810 ---- RETVAL CORBA::ULongLong ! div (self, other, reverse=&PL_sv_undef) CORBA::ULongLong self CORBA::ULongLong other SV *reverse *************** *** 817,823 **** RETVAL CORBA::ULongLong ! mul (self, other, reverse=&sv_undef) CORBA::ULongLong self CORBA::ULongLong other CODE: --- 817,823 ---- RETVAL CORBA::ULongLong ! mul (self, other, reverse=&PL_sv_undef) CORBA::ULongLong self CORBA::ULongLong other CODE: *************** *** 826,832 **** RETVAL CORBA::ULongLong ! mod (self, other, reverse=&sv_undef) CORBA::ULongLong self CORBA::ULongLong other SV *reverse --- 826,832 ---- RETVAL CORBA::ULongLong ! mod (self, other, reverse=&PL_sv_undef) CORBA::ULongLong self CORBA::ULongLong other SV *reverse *************** *** 839,845 **** RETVAL int ! cmp (self, other, reverse=&sv_undef) CORBA::ULongLong self CORBA::ULongLong other SV *reverse --- 839,845 ---- RETVAL int ! cmp (self, other, reverse=&PL_sv_undef) CORBA::ULongLong self CORBA::ULongLong other SV *reverse *************** *** 862,868 **** RETVAL SV * ! stringify (self, other=0, reverse=&sv_undef) CORBA::LongDouble self CODE: { --- 862,868 ---- RETVAL SV * ! stringify (self, other=0, reverse=&PL_sv_undef) CORBA::LongDouble self CODE: { *************** *** 874,880 **** RETVAL CORBA::LongDouble ! add (self, other, reverse=&sv_undef) CORBA::LongDouble self CORBA::LongDouble other CODE: --- 874,880 ---- RETVAL CORBA::LongDouble ! add (self, other, reverse=&PL_sv_undef) CORBA::LongDouble self CORBA::LongDouble other CODE: *************** *** 883,889 **** RETVAL CORBA::LongDouble ! subtract (self, other, reverse=&sv_undef) CORBA::LongDouble self CORBA::LongDouble other SV *reverse --- 883,889 ---- RETVAL CORBA::LongDouble ! subtract (self, other, reverse=&PL_sv_undef) CORBA::LongDouble self CORBA::LongDouble other SV *reverse *************** *** 896,902 **** RETVAL CORBA::LongDouble ! div (self, other, reverse=&sv_undef) CORBA::LongDouble self CORBA::LongDouble other SV *reverse --- 896,902 ---- RETVAL CORBA::LongDouble ! div (self, other, reverse=&PL_sv_undef) CORBA::LongDouble self CORBA::LongDouble other SV *reverse *************** *** 909,915 **** RETVAL CORBA::LongDouble ! mul (self, other, reverse=&sv_undef) CORBA::LongDouble self CORBA::LongDouble other CODE: --- 909,915 ---- RETVAL CORBA::LongDouble ! mul (self, other, reverse=&PL_sv_undef) CORBA::LongDouble self CORBA::LongDouble other CODE: *************** *** 918,924 **** RETVAL CORBA::LongDouble ! neg (self, other=0, reverse=&sv_undef) CORBA::LongDouble self CODE: RETVAL = -self; --- 918,924 ---- RETVAL CORBA::LongDouble ! neg (self, other=0, reverse=&PL_sv_undef) CORBA::LongDouble self CODE: RETVAL = -self; *************** *** 926,932 **** RETVAL CORBA::LongDouble ! abs (self, other=0, reverse=&sv_undef) CORBA::LongDouble self CODE: RETVAL = (self > 0) ? self : -self; --- 926,932 ---- RETVAL CORBA::LongDouble ! abs (self, other=0, reverse=&PL_sv_undef) CORBA::LongDouble self CODE: RETVAL = (self > 0) ? self : -self; *************** *** 934,940 **** RETVAL int ! cmp (self, other, reverse=&sv_undef) CORBA::LongDouble self CORBA::LongDouble other SV *reverse --- 934,940 ---- RETVAL int ! cmp (self, other, reverse=&PL_sv_undef) CORBA::LongDouble self CORBA::LongDouble other SV *reverse *************** *** 1234,1240 **** RETVAL void ! PortableServer::POA::DESTROY (id) CODE: CORBA::release (THIS); --- 1234,1240 ---- RETVAL void ! PortableServer::POA::DESTROY () CODE: CORBA::release (THIS); Index: CORBA/MICO/errors.cc diff -c CORBA/MICO/errors.cc:1.1.1.1 CORBA/MICO/errors.cc:1.2 *** CORBA/MICO/errors.cc:1.1.1.1 Thu Feb 8 12:41:00 2001 --- CORBA/MICO/errors.cc Thu Feb 8 13:01:41 2001 *************** *** 219,225 **** if (!svp) return NULL; ! return SvPV(*svp, na); } void --- 219,225 ---- if (!svp) return NULL; ! return SvPV(*svp, PL_na); } void Index: CORBA/MICO/exttypes.h diff -c CORBA/MICO/exttypes.h:1.1.1.1 CORBA/MICO/exttypes.h:1.2 *** CORBA/MICO/exttypes.h:1.1.1.1 Thu Feb 8 12:41:00 2001 --- CORBA/MICO/exttypes.h Thu Feb 8 13:01:42 2001 *************** *** 3,17 **** #define LL_VALUE(sv) (*(long long *) &SvNVX (sv)) #define SvLLV(sv) (sv_isa (sv, "CORBA::LongLong") ? \ LL_VALUE (SvRV (sv)) : \ ! longlong_from_string (SvPV (sv, na))) #define ULL_VALUE(sv) (*(unsigned long long *) &SvNVX (sv)) #define SvULLV(sv) (sv_isa (sv, "CORBA::ULongLong") ? \ ULL_VALUE (SvRV (sv)) : \ ! ulonglong_from_string (SvPV (sv, na))) #define LD_VALUE(sv) (*(long double *) SvPVX (sv)) #define SvLDV(sv) (sv_isa (sv, "CORBA::LongDouble") ? \ LD_VALUE (SvRV (sv)) : \ ! longdouble_from_string (SvPV (sv, na))) SV *ll_from_longlong (long long val); long long longlong_from_string (const char *str); --- 3,17 ---- #define LL_VALUE(sv) (*(long long *) &SvNVX (sv)) #define SvLLV(sv) (sv_isa (sv, "CORBA::LongLong") ? \ LL_VALUE (SvRV (sv)) : \ ! longlong_from_string (SvPV (sv, PL_na))) #define ULL_VALUE(sv) (*(unsigned long long *) &SvNVX (sv)) #define SvULLV(sv) (sv_isa (sv, "CORBA::ULongLong") ? \ ULL_VALUE (SvRV (sv)) : \ ! ulonglong_from_string (SvPV (sv, PL_na))) #define LD_VALUE(sv) (*(long double *) SvPVX (sv)) #define SvLDV(sv) (sv_isa (sv, "CORBA::LongDouble") ? \ LD_VALUE (SvRV (sv)) : \ ! longdouble_from_string (SvPV (sv, PL_na))) SV *ll_from_longlong (long long val); long long longlong_from_string (const char *str); Index: CORBA/MICO/interfaces.cc diff -c CORBA/MICO/interfaces.cc:1.1.1.1 CORBA/MICO/interfaces.cc:1.3 *** CORBA/MICO/interfaces.cc:1.1.1.1 Thu Feb 8 12:40:59 2001 --- CORBA/MICO/interfaces.cc Fri Feb 9 11:47:38 2001 *************** *** 111,117 **** if (!repoidp) croak("_pmico_callStub called with bad package (no %s)",repoid_key); ! repoid = SvPV(GvSV(*repoidp), na); PMicoIfaceInfo *info = pmico_find_interface_description (repoid); --- 111,117 ---- if (!repoidp) croak("_pmico_callStub called with bad package (no %s)",repoid_key); ! repoid = SvPV(GvSV(*repoidp), PL_na); PMicoIfaceInfo *info = pmico_find_interface_description (repoid); *************** *** 145,192 **** CORBA::OperationDescription *opr = &desc->operations[index-OPERATION_BASE]; j = 1; for (i = 0 ; iparameters.length() ; i++) { ! SV *arg = (j<(CORBA::ULong)items) ? ST(j) : &sv_undef; ! CORBA::Any *argany; switch (opr->parameters[i].mode) { case CORBA::PARAM_IN: ! argany = &req->add_in_arg ( opr->parameters[i].name ); ! argany->type ( opr->parameters[i].type ); ! if (!pmico_to_any ( argany , arg )) croak ("Error marshalling parameter '%s'", (char *)opr->parameters[i].name); j++; break; case CORBA::PARAM_INOUT: if (!SvROK(arg)) croak ("INOUT parameter must be a reference"); ! argany = &req->add_in_arg ( opr->parameters[i].name ); ! argany->type ( opr->parameters[i].type ); ! if (!pmico_to_any ( argany , SvRV(arg) )) ! croak ("Error marshalling parameter '%s'", ! (char *)opr->parameters[i].name); j++; break; case CORBA::PARAM_OUT: ! argany = &req->add_out_arg ( opr->parameters[i].name ); ! argany->type ( opr->parameters[i].type ); break; } } ! req->result()->value()->type ( opr->result ); } else if (index >= GETTER_BASE && index < SETTER_BASE) { ! req->result()->value()->type ( desc->attributes[index-GETTER_BASE].type ); } else if (index >= SETTER_BASE) { if (items < 2) croak("%s::%s called without second argument", HvNAME(CvSTASH(cv)), name.c_str ()); ! CORBA::Any *argany = &req->add_in_arg( "_value" ); ! argany->type ( desc->attributes[index-SETTER_BASE].type ); if (!pmico_to_any (argany, ST(1))) croak ("Error marshalling attribute value"); req->result()->value()->type ( CORBA::_tc_void ); } --- 145,194 ---- CORBA::OperationDescription *opr = &desc->operations[index-OPERATION_BASE]; j = 1; for (i = 0 ; iparameters.length() ; i++) { ! SV *arg = (j<(CORBA::ULong)items) ? ST(j) : &PL_sv_undef; switch (opr->parameters[i].mode) { case CORBA::PARAM_IN: ! { ! CORBA::Any_var argany = new CORBA::Any(opr->parameters[i].type, 0 ); ! if (!pmico_to_any ( argany , arg )) croak ("Error marshalling parameter '%s'", (char *)opr->parameters[i].name); + req->add_in_arg ( opr->parameters[i].name ) = *argany; + } j++; break; case CORBA::PARAM_INOUT: if (!SvROK(arg)) croak ("INOUT parameter must be a reference"); ! { ! CORBA::Any_var argany = new CORBA::Any(opr->parameters[i].type, 0 ); ! if (!pmico_to_any ( argany , SvRV(arg) )) ! croak ("Error marshalling parameter '%s'", ! (char *)opr->parameters[i].name); ! req->add_in_arg ( opr->parameters[i].name ) = *argany; ! } j++; break; case CORBA::PARAM_OUT: ! req->add_out_arg().set_type( opr->parameters[i].type ); break; } } ! req->result()->value()->set_type ( opr->result ); } else if (index >= GETTER_BASE && index < SETTER_BASE) { ! req->result()->value()->set_type ( desc->attributes[index-GETTER_BASE].type ); } else if (index >= SETTER_BASE) { if (items < 2) croak("%s::%s called without second argument", HvNAME(CvSTASH(cv)), name.c_str ()); ! CORBA::Any_var argany = new CORBA::Any(desc->attributes[index-SETTER_BASE].type, 0 ); if (!pmico_to_any (argany, ST(1))) croak ("Error marshalling attribute value"); + req->add_in_arg ( "_value" ) = *argany; req->result()->value()->type ( CORBA::_tc_void ); } *************** *** 216,222 **** if (res) ST(0) = sv_2mortal(res); // we have at least 1 argument else ! ST(0) = &sv_undef; return_count++; } --- 218,224 ---- if (res) ST(0) = sv_2mortal(res); // we have at least 1 argument else ! ST(0) = &PL_sv_undef; return_count++; } *************** *** 231,237 **** if (res) sv_setsv (SvRV(ST(j)), res); else ! sv_setsv (SvRV(ST(j)), &sv_undef); j++; } else if (item->flags () & CORBA::ARG_IN) { j++; --- 233,239 ---- if (res) sv_setsv (SvRV(ST(j)), res); else ! sv_setsv (SvRV(ST(j)), &PL_sv_undef); j++; } else if (item->flags () & CORBA::ARG_IN) { j++; *************** *** 247,253 **** if (res) ST(return_count) = sv_2mortal (res); else ! ST(return_count) = &sv_undef; return_count++; } } --- 249,255 ---- if (res) ST(return_count) = sv_2mortal (res); else ! ST(return_count) = &PL_sv_undef; return_count++; } } Index: CORBA/MICO/server.cc diff -c CORBA/MICO/server.cc:1.1.1.1 CORBA/MICO/server.cc:1.4 *** CORBA/MICO/server.cc:1.1.1.1 Thu Feb 8 12:40:59 2001 --- CORBA/MICO/server.cc Mon Feb 19 13:07:25 2001 *************** *** 102,108 **** } // FIXME: memory leaks? ! return newSVsv(&sv_undef); } static string --- 102,108 ---- } // FIXME: memory leaks? ! return newSVsv(&PL_sv_undef); } static string *************** *** 219,225 **** CORBA::CompletionStatus status; svp = hv_fetch((HV *)SvRV(perl_except), "-status", 7, 0); if (svp) { ! char *cstr = SvPV(*svp, na); if (!strcmp(cstr,"COMPLETED_YES")) status = CORBA::COMPLETED_YES; --- 219,225 ---- CORBA::CompletionStatus status; svp = hv_fetch((HV *)SvRV(perl_except), "-status", 7, 0); if (svp) { ! char *cstr = SvPV(*svp, PL_na); if (!strcmp(cstr,"COMPLETED_YES")) status = CORBA::COMPLETED_YES; *************** *** 252,258 **** if (!strcmp ((*exceptions)[i].id, repoid)) { CORBA::Any *any = new CORBA::Any; ! any->type ((*exceptions)[i].type); if (pmico_to_any (any, perl_except)) return new CORBA::UnknownUserException (any); else { --- 252,258 ---- if (!strcmp ((*exceptions)[i].id, repoid)) { CORBA::Any *any = new CORBA::Any; ! any->set_type ((*exceptions)[i].type); if (pmico_to_any (any, perl_except)) return new CORBA::UnknownUserException (any); else { *************** *** 277,283 **** GV *throwngv = gv_fetchpv("Error::THROWN", TRUE, SVt_PV); save_scalar (throwngv); // assume enclosing scope ! sv_setsv (GvSV(throwngv), &sv_undef); int return_count = perl_call_method ((char *)name, G_EVAL | ((return_items == 0) ? G_VOID : --- 277,283 ---- GV *throwngv = gv_fetchpv("Error::THROWN", TRUE, SVt_PV); save_scalar (throwngv); // assume enclosing scope ! sv_setsv (GvSV(throwngv), &PL_sv_undef); int return_count = perl_call_method ((char *)name, G_EVAL | ((return_items == 0) ? G_VOID : *************** *** 295,301 **** return pmico_encode_exception (name, GvSV(throwngv), exceptions); SPAGAIN; } else { ! warn ("Error occured in implementation of '%s': %s", name, SvPV(ERRSV,na)); return new CORBA::UNKNOWN (0, CORBA::COMPLETED_MAYBE); } } --- 295,301 ---- return pmico_encode_exception (name, GvSV(throwngv), exceptions); SPAGAIN; } else { ! warn ("Error occured in implementation of '%s': %s", name, SvPV(ERRSV,PL_na)); return new CORBA::UNKNOWN (0, CORBA::COMPLETED_MAYBE); } } *************** *** 381,387 **** XPUSHs(sv_2mortal(newRV_inc(perlobj))); SV *tmp = sv_newmortal(); ! sv_setref_pv(tmp, "PortableServer::POA", (void *)parent); XPUSHs(tmp); XPUSHs(sv_2mortal(newSVpv((char *)name, 0))); --- 381,388 ---- XPUSHs(sv_2mortal(newRV_inc(perlobj))); SV *tmp = sv_newmortal(); ! PortableServer::POA_ptr prnt = PortableServer::POA::_duplicate(parent); ! sv_setref_pv(tmp, "PortableServer::POA", (void *)prnt); XPUSHs(tmp); XPUSHs(sv_2mortal(newSVpv((char *)name, 0))); *************** *** 426,432 **** XPUSHs(sv_2mortal(pmico_oid_to_sv (&oid))); SV *tmp = sv_newmortal(); ! sv_setref_pv(tmp, "PortableServer::POA", (void *)adapter); XPUSHs(tmp); PUTBACK; --- 427,434 ---- XPUSHs(sv_2mortal(pmico_oid_to_sv (&oid))); SV *tmp = sv_newmortal(); ! PortableServer::POA_ptr adptr = PortableServer::POA::_duplicate(adapter); ! sv_setref_pv(tmp, "PortableServer::POA", (void *)adptr); XPUSHs(tmp); PUTBACK; *************** *** 469,475 **** XPUSHs(sv_2mortal(pmico_oid_to_sv (&oid))); SV *tmp = sv_newmortal(); ! sv_setref_pv(tmp, "PortableServer::POA", (void *)adapter); XPUSHs(tmp); XPUSHs(sv_2mortal(pmico_servant_to_sv (serv))); XPUSHs(cleanup_in_progress ? &PL_sv_yes : &PL_sv_no); --- 471,478 ---- XPUSHs(sv_2mortal(pmico_oid_to_sv (&oid))); SV *tmp = sv_newmortal(); ! PortableServer::POA_ptr adptr = PortableServer::POA::_duplicate(adapter); ! sv_setref_pv(tmp, "PortableServer::POA", (void *)adptr); XPUSHs(tmp); XPUSHs(sv_2mortal(pmico_servant_to_sv (serv))); XPUSHs(cleanup_in_progress ? &PL_sv_yes : &PL_sv_no); *************** *** 508,514 **** XPUSHs(sv_2mortal(pmico_oid_to_sv (&oid))); SV *tmp = sv_newmortal(); ! sv_setref_pv(tmp, "PortableServer::POA", (void *)adapter); XPUSHs(tmp); XPUSHs(sv_2mortal(newSVpv((char *)operation, 0))); --- 511,518 ---- XPUSHs(sv_2mortal(pmico_oid_to_sv (&oid))); SV *tmp = sv_newmortal(); ! PortableServer::POA_ptr adptr = PortableServer::POA::_duplicate(adapter); ! sv_setref_pv(tmp, "PortableServer::POA", (void *)adptr); XPUSHs(tmp); XPUSHs(sv_2mortal(newSVpv((char *)operation, 0))); *************** *** 556,562 **** XPUSHs(sv_2mortal(pmico_oid_to_sv (&oid))); SV *tmp = sv_newmortal(); ! sv_setref_pv(tmp, "PortableServer::POA", (void *)adapter); XPUSHs(tmp); XPUSHs(sv_2mortal(newSVpv((char *)operation, 0))); XPUSHs(sv_2mortal(pmico_servant_to_sv (serv))); --- 560,567 ---- XPUSHs(sv_2mortal(pmico_oid_to_sv (&oid))); SV *tmp = sv_newmortal(); ! PortableServer::POA_ptr adptr = PortableServer::POA::_duplicate(adapter); ! sv_setref_pv(tmp, "PortableServer::POA", (void *)adptr); XPUSHs(tmp); XPUSHs(sv_2mortal(newSVpv((char *)operation, 0))); XPUSHs(sv_2mortal(pmico_servant_to_sv (serv))); *************** *** 659,665 **** if (attr_desc) { args = new CORBA::NVList (); args->add ( CORBA::ARG_IN ); ! args->item ( 0 )->value()->type( attr_desc->type ); } } else if (!strncmp( name, "_get_", 5)) { CORBA::AttributeDescription *attr_desc = find_attribute(desc, name+5, FALSE); --- 664,670 ---- if (attr_desc) { args = new CORBA::NVList (); args->add ( CORBA::ARG_IN ); ! args->item ( 0 )->value()->set_type( attr_desc->type ); } } else if (!strncmp( name, "_get_", 5)) { CORBA::AttributeDescription *attr_desc = find_attribute(desc, name+5, FALSE); *************** *** 688,694 **** inout_items++; break; } ! args->item(i)->value()->type(op_desc->parameters[i].type); } if (op_desc->result->kind() != CORBA::tk_void) { --- 693,699 ---- inout_items++; break; } ! args->item(i)->value()->set_type(op_desc->parameters[i].type); } if (op_desc->result->kind() != CORBA::tk_void) { *************** *** 808,814 **** if (return_type != NULL) { CORBA::Any *res = new CORBA::Any; ! res->type (return_type); if (pmico_to_any (res, *(sp+1))) _req->result (res); else { --- 813,819 ---- if (return_type != NULL) { CORBA::Any *res = new CORBA::Any; ! res->set_type (return_type); if (pmico_to_any (res, *(sp+1))) _req->result (res); else { Index: CORBA/MICO/types.cc diff -c CORBA/MICO/types.cc:1.1.1.1 CORBA/MICO/types.cc:1.2 *** CORBA/MICO/types.cc:1.1.1.1 Thu Feb 8 12:41:00 2001 --- CORBA/MICO/types.cc Thu Feb 8 13:01:42 2001 *************** *** 16,22 **** { if (CORBA::is_nil (obj)) // FIXME: memory leaks? ! return newSVsv(&sv_undef); char buf[24]; sprintf(buf, "%ld", (IV)obj); --- 16,22 ---- { if (CORBA::is_nil (obj)) // FIXME: memory leaks? ! return newSVsv(&PL_sv_undef); char buf[24]; sprintf(buf, "%ld", (IV)obj); *************** *** 205,214 **** static bool enum_to_any (CORBA::Any *res, CORBA::TypeCode *tc, SV *sv) { ! CORBA::Long ind = tc->member_index (SvPV(sv, na)); if (ind < 0) { ! warn ("Invalid enumeration value '%s'", SvPV(sv,na)); return false; } --- 205,214 ---- static bool enum_to_any (CORBA::Any *res, CORBA::TypeCode *tc, SV *sv) { ! CORBA::Long ind = tc->member_index (SvPV(sv, PL_na)); if (ind < 0) { ! warn ("Invalid enumeration value '%s'", SvPV(sv,PL_na)); return false; } *************** *** 267,278 **** if (!res->seq_put_begin(len)) return false; if (content_tc->kind() == CORBA::tk_octet) { ! CORBA::Octet *buf = (CORBA::Octet *)SvPV(sv,na); for (CORBA::ULong i = 0 ; i < len ; i++) *res <<= CORBA::Any::from_octet(buf[i]); } else if (content_tc->kind() == CORBA::tk_char) { ! CORBA::Char *buf = (CORBA::Char *)SvPV(sv,na); for (CORBA::ULong i = 0 ; i < len ; i++) *res <<= CORBA::Any::from_char(buf[i]); } --- 267,278 ---- if (!res->seq_put_begin(len)) return false; if (content_tc->kind() == CORBA::tk_octet) { ! CORBA::Octet *buf = (CORBA::Octet *)SvPV(sv,PL_na); for (CORBA::ULong i = 0 ; i < len ; i++) *res <<= CORBA::Any::from_octet(buf[i]); } else if (content_tc->kind() == CORBA::tk_char) { ! CORBA::Char *buf = (CORBA::Char *)SvPV(sv,PL_na); for (CORBA::ULong i = 0 ; i < len ; i++) *res <<= CORBA::Any::from_char(buf[i]); } *************** *** 476,482 **** static bool string_to_any (CORBA::Any *res, CORBA::TypeCode *tc, SV *sv) { ! *res <<= CORBA::Any::from_string(SvPV(sv, na), tc->length(), false); return true; } --- 476,482 ---- static bool string_to_any (CORBA::Any *res, CORBA::TypeCode *tc, SV *sv) { ! *res <<= CORBA::Any::from_string(SvPV(sv, PL_na), tc->length(), false); return true; } *************** *** 732,738 **** CORBA::Boolean v; *any >>= CORBA::Any::to_boolean(v); ! return newSVsv(v?&sv_yes:&sv_no); } static SV * --- 732,738 ---- CORBA::Boolean v; *any >>= CORBA::Any::to_boolean(v); ! return newSVsv(v?&PL_sv_yes:&PL_sv_no); } static SV * *************** *** 804,817 **** if (content_tc->kind() == CORBA::tk_octet) { res = newSV(len); ! CORBA::Octet *buf = (CORBA::Octet *)SvPV(res,na); SvCUR_set(res,len); for (CORBA::ULong i = 0 ; i < len ; i++) if (!(*any >>= CORBA::Any::to_octet(buf[i]))) goto error; } else if (content_tc->kind() == CORBA::tk_char) { res = newSV(len); ! CORBA::Char *buf = (CORBA::Char *)SvPV(res,na); SvCUR_set(res,len); for (CORBA::ULong i = 0 ; i < len ; i++) if (!(*any >>= CORBA::Any::to_char(buf[i]))) goto error; --- 804,817 ---- if (content_tc->kind() == CORBA::tk_octet) { res = newSV(len); ! CORBA::Octet *buf = (CORBA::Octet *)SvPV(res,PL_na); SvCUR_set(res,len); for (CORBA::ULong i = 0 ; i < len ; i++) if (!(*any >>= CORBA::Any::to_octet(buf[i]))) goto error; } else if (content_tc->kind() == CORBA::tk_char) { res = newSV(len); ! CORBA::Char *buf = (CORBA::Char *)SvPV(res,PL_na); SvCUR_set(res,len); for (CORBA::ULong i = 0 ; i < len ; i++) if (!(*any >>= CORBA::Any::to_char(buf[i]))) goto error; *************** *** 943,949 **** av_push (av,res); } else { ! av_push (av, &sv_undef); } if (!any->union_get_end()) --- 943,949 ---- av_push (av,res); } else { ! av_push (av, &PL_sv_undef); } if (!any->union_get_end()) *************** *** 961,967 **** any_from_any (CORBA::Any *any, CORBA::TypeCode *tc) { CORBA::Any *a = new CORBA::Any; ! *any >>= *a; SV *res = newSV(0); return sv_setref_pv (res, "CORBA::Any", (void *)a); --- 961,967 ---- any_from_any (CORBA::Any *any, CORBA::TypeCode *tc) { CORBA::Any *a = new CORBA::Any; ! *a = *any; //*any >>= *a; SV *res = newSV(0); return sv_setref_pv (res, "CORBA::Any", (void *)a); *************** *** 977,983 **** static SV * string_from_any (CORBA::Any *any, CORBA::TypeCode *tc) { ! char *result; SV *sv = NULL; if (*any >>= CORBA::Any::to_string (result, tc->length())) --- 977,983 ---- static SV * string_from_any (CORBA::Any *any, CORBA::TypeCode *tc) { ! const char *result = 0; SV *sv = NULL; if (*any >>= CORBA::Any::to_string (result, tc->length())) *************** *** 1091,1097 **** { switch (tc->kind()) { case CORBA::tk_null: ! return newSVsv(&sv_undef); case CORBA::tk_void: return NULL; case CORBA::tk_short: --- 1091,1097 ---- { switch (tc->kind()) { case CORBA::tk_null: ! return newSVsv(&PL_sv_undef); case CORBA::tk_void: return NULL; case CORBA::tk_short: