rpms/ice/F-7 527d1189575595-patch-1-ice-3-2-1-icedotnet-patch1.txt, NONE, 1.1 530d1190105491-patch-2-ice-3-2-1-fix-icegrid-application-update-bug-patch.txt, NONE, 1.1 531d1190619626-patch-3-ice-3-2-1-fix-slice2cs-ice-3.2.1-patch3.txt, NONE, 1.1

Mary Ellen Foster (mef) fedora-extras-commits at redhat.com
Wed Sep 26 08:56:25 UTC 2007


Author: mef

Update of /cvs/pkgs/rpms/ice/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20245

Added Files:
	527d1189575595-patch-1-ice-3-2-1-icedotnet-patch1.txt 
	530d1190105491-patch-2-ice-3-2-1-fix-icegrid-application-update-bug-patch.txt 
	531d1190619626-patch-3-ice-3-2-1-fix-slice2cs-ice-3.2.1-patch3.txt 
Log Message:
Added patch files directly; I guess you can't download them while building.



--- NEW FILE 527d1189575595-patch-1-ice-3-2-1-icedotnet-patch1.txt ---
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 78d234d..37b695e 100755
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -2054,7 +2054,8 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
             _out << sb;
             for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
             {
-                _out << nl << "this." << fixId((*q)->name()) << " = " << fixId((*q)->name()) << ';';
+                string name = fixId((*q)->name(), DotNet::ApplicationException, false);
+                _out << nl << "this." << name << " = " << fixId((*q)->name()) << ';';
             }
             _out << eb;
         }


--- NEW FILE 530d1190105491-patch-2-ice-3-2-1-fix-icegrid-application-update-bug-patch.txt ---
diff --git a/cpp/src/IceGrid/DescriptorHelper.cpp b/cpp/src/IceGrid/DescriptorHelper.cpp
index c41aa5c..1368294 100644
--- a/cpp/src/IceGrid/DescriptorHelper.cpp
+++ b/cpp/src/IceGrid/DescriptorHelper.cpp
@@ -1195,19 +1195,20 @@ ServiceHelper::ServiceHelper(const ServiceDescriptorPtr& descriptor) :
 }
 
 bool 
-ServiceHelper::operator==(const ServiceHelper& helper) const
+ServiceHelper::operator==(const CommunicatorHelper& h) const
 {
-    if(!CommunicatorHelper::operator==(helper))
+    const ServiceHelper* helper = dynamic_cast<const ServiceHelper*>(&h);
+    if(!helper || !CommunicatorHelper::operator==(h))
     {
         return false;
     }
 
-    if(_desc->name != helper._desc->name)
+    if(_desc->name != helper->_desc->name)
     {
         return false;
     }
 
-    if(_desc->entry != helper._desc->entry)
+    if(_desc->entry != helper->_desc->entry)
     {
         return false;
     }
@@ -1216,7 +1217,7 @@ ServiceHelper::operator==(const ServiceHelper& helper) const
 }
 
 bool
-ServiceHelper::operator!=(const ServiceHelper& helper) const
+ServiceHelper::operator!=(const CommunicatorHelper& helper) const
 {
     return !operator==(helper);
 }
@@ -1272,66 +1273,67 @@ ServerHelper::ServerHelper(const ServerDescriptorPtr& descriptor) :
 }
 
 bool 
-ServerHelper::operator==(const ServerHelper& helper) const
+ServerHelper::operator==(const CommunicatorHelper& h) const
 {
-    if(!CommunicatorHelper::operator==(helper))
+    const ServerHelper* helper = dynamic_cast<const ServerHelper*>(&h);
+    if(!helper || !CommunicatorHelper::operator==(h))
     {
         return false;
     }
 
-    if(_desc->id != helper._desc->id)
+    if(_desc->id != helper->_desc->id)
     {
         return false;
     }
 
-    if(_desc->exe != helper._desc->exe)
+    if(_desc->exe != helper->_desc->exe)
     {
         return false;
     }
 
-    if(_desc->pwd != helper._desc->pwd)
+    if(_desc->pwd != helper->_desc->pwd)
     {
         return false;
     }
 
     if(set<string>(_desc->options.begin(), _desc->options.end()) != 
-       set<string>(helper._desc->options.begin(), helper._desc->options.end()))
+       set<string>(helper->_desc->options.begin(), helper->_desc->options.end()))
     {
         return false;
     }
 
     if(set<string>(_desc->envs.begin(), _desc->envs.end()) != 
-       set<string>(helper._desc->envs.begin(), helper._desc->envs.end()))
+       set<string>(helper->_desc->envs.begin(), helper->_desc->envs.end()))
     {
         return false;
     }
 
-    if(_desc->activation != helper._desc->activation)
+    if(_desc->activation != helper->_desc->activation)
     {
         return false;
     }
 
-    if(_desc->activationTimeout != helper._desc->activationTimeout)
+    if(_desc->activationTimeout != helper->_desc->activationTimeout)
     {
         return false;
     }
 
-    if(_desc->deactivationTimeout != helper._desc->deactivationTimeout)
+    if(_desc->deactivationTimeout != helper->_desc->deactivationTimeout)
     {
         return false;
     }
 
-    if(_desc->distrib != helper._desc->distrib)
+    if(_desc->distrib != helper->_desc->distrib)
     {
         return false;
     }
 
-    if(_desc->allocatable != helper._desc->allocatable)
+    if(_desc->allocatable != helper->_desc->allocatable)
     {
         return false;
     }
 
-    if(_desc->user != helper._desc->user)
+    if(_desc->user != helper->_desc->user)
     {
         return false;
     }
@@ -1340,7 +1342,7 @@ ServerHelper::operator==(const ServerHelper& helper) const
 }
 
 bool
-ServerHelper::operator!=(const ServerHelper& helper) const
+ServerHelper::operator!=(const CommunicatorHelper& helper) const
 {
     return !operator==(helper);
 }
@@ -1483,14 +1485,15 @@ IceBoxHelper::IceBoxHelper(const IceBoxDescriptorPtr& descriptor) :
 }
 
 bool 
-IceBoxHelper::operator==(const IceBoxHelper& helper) const
+IceBoxHelper::operator==(const CommunicatorHelper& h) const
 {
-    if(!ServerHelper::operator==(helper))
+    const IceBoxHelper* helper = dynamic_cast<const IceBoxHelper*>(&h);
+    if(!helper || !ServerHelper::operator==(h))
     {
         return false;
     }
-        
-    if(_services != helper._services)
+
+    if(_services != helper->_services)
     {
         return false;
     }
@@ -1499,7 +1502,7 @@ IceBoxHelper::operator==(const IceBoxHelper& helper) const
 }
 
 bool
-IceBoxHelper::operator!=(const IceBoxHelper& helper) const
+IceBoxHelper::operator!=(const CommunicatorHelper& helper) const
 {
     return !operator==(helper);
 }
diff --git a/cpp/src/IceGrid/DescriptorHelper.h b/cpp/src/IceGrid/DescriptorHelper.h
index e222940..f16d50a 100644
--- a/cpp/src/IceGrid/DescriptorHelper.h
+++ b/cpp/src/IceGrid/DescriptorHelper.h
@@ -86,8 +86,8 @@ public:
     CommunicatorHelper() { }
     virtual ~CommunicatorHelper() { }
 
-    bool operator==(const CommunicatorHelper&) const;
-    bool operator!=(const CommunicatorHelper&) const;
+    virtual bool operator==(const CommunicatorHelper&) const;
+    virtual bool operator!=(const CommunicatorHelper&) const;
 
     virtual void getIds(std::multiset<std::string>&, std::multiset<Ice::Identity>&) const;
     virtual void getReplicaGroups(std::set<std::string>&) const;
@@ -115,8 +115,8 @@ public:
     ServiceHelper(const ServiceDescriptorPtr&);
     ServiceHelper() { }
 
-    bool operator==(const ServiceHelper&) const;
-    bool operator!=(const ServiceHelper&) const;    
+    virtual bool operator==(const CommunicatorHelper&) const;
+    virtual bool operator!=(const CommunicatorHelper&) const;    
 
     ServiceDescriptorPtr getDescriptor() const;
     ServiceDescriptorPtr instantiate(const Resolver&, const PropertyDescriptorSeq&, 
@@ -141,8 +141,8 @@ public:
     ServerHelper(const ServerDescriptorPtr&);
     ServerHelper() { }
 
-    bool operator==(const ServerHelper&) const;
-    bool operator!=(const ServerHelper&) const;    
+    virtual bool operator==(const CommunicatorHelper&) const;
+    virtual bool operator!=(const CommunicatorHelper&) const;    
 
     ServerDescriptorPtr getDescriptor() const;
     virtual ServerDescriptorPtr instantiate(const Resolver&, const PropertyDescriptorSeq&,
@@ -203,8 +203,8 @@ public:
     IceBoxHelper(const IceBoxDescriptorPtr&);
     IceBoxHelper() { }
 
-    bool operator==(const IceBoxHelper&) const;
-    bool operator!=(const IceBoxHelper&) const;    
+    virtual bool operator==(const CommunicatorHelper&) const;
+    virtual bool operator!=(const CommunicatorHelper&) const;    
 
     virtual ServerDescriptorPtr instantiate(const Resolver&, const PropertyDescriptorSeq&, 
                                             const PropertySetDescriptorDict&) const;
@@ -267,8 +267,8 @@ public:
     NodeHelper(const std::string&, const NodeDescriptor&, const Resolver&, bool);
     virtual ~NodeHelper() { }
 
-    bool operator==(const NodeHelper&) const;
-    bool operator!=(const NodeHelper&) const;
+    virtual bool operator==(const NodeHelper&) const;
+    virtual bool operator!=(const NodeHelper&) const;
 
     NodeUpdateDescriptor diff(const NodeHelper&) const;
     NodeDescriptor update(const NodeUpdateDescriptor&, const Resolver&) const;


--- NEW FILE 531d1190619626-patch-3-ice-3-2-1-fix-slice2cs-ice-3.2.1-patch3.txt ---
diff --git a/cpp/include/Slice/CsUtil.h b/cpp/include/Slice/CsUtil.h
index 28c8b57..ca935b3 100644
--- a/cpp/include/Slice/CsUtil.h
+++ b/cpp/include/Slice/CsUtil.h
@@ -34,6 +34,7 @@ public:
 
 protected:
     static std::string fixId(const std::string&, int = 0, bool = false);
+    static std::string fixId(const ContainedPtr&, int = 0, bool = false);
     static std::string typeToString(const TypePtr&);
     static bool isValueType(const TypePtr&);
 
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp
index 061033b..387de74 100755
--- a/cpp/src/Slice/CsUtil.cpp
+++ b/cpp/src/Slice/CsUtil.cpp
@@ -130,6 +130,21 @@ Slice::CsGenerator::fixId(const string& name, int baseTypes, bool mangleCasts)
 }
 
 string
+Slice::CsGenerator::fixId(const ContainedPtr& cont, int baseTypes, bool mangleCasts)
+{
+    ContainerPtr container = cont->container();
+    ContainedPtr contained = ContainedPtr::dynamicCast(container);
+    if(contained && contained->hasMetaData("clr:property"))
+    {
+        return cont->name() + "_prop";
+    }
+    else
+    {
+        return fixId(cont->name(), baseTypes, mangleCasts);
+    }
+}
+
+string
 Slice::CsGenerator::typeToString(const TypePtr& type)
 {
     if(!type)
@@ -476,7 +491,10 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out,
         else
         {
             string typeS = typeToString(type);
-            out << nl << param << " = new " << typeS << "();";
+            if(param.size() < 6 || param.substr(param.size() - 5) != "_prop")
+            {
+                out << nl << param << " = new " << typeS << "();";
+            }
             if(streamingAPI)
             {
                 out << nl << param << ".ice_read(" << stream << ");";
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 5f83f8f..80c096b 100755
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -728,8 +728,7 @@ Slice::CsVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p, bool stream)
     _out << nl << "os__.startWriteSlice();";
     for(d = members.begin(); d != members.end(); ++d)
     {
-        writeMarshalUnmarshalCode(_out, (*d)->type(),
-                                  fixId((*d)->name(), DotNet::ICloneable, true),
+        writeMarshalUnmarshalCode(_out, (*d)->type(), fixId(*d, DotNet::ICloneable, true),
                                   true, false, false);
     }
     _out << nl << "os__.endWriteSlice();";
@@ -831,8 +830,7 @@ Slice::CsVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p, bool stream)
                 patchParams << ", " << classMemberCount++;
             }
         }
-        writeMarshalUnmarshalCode(_out, (*d)->type(),
-                                  fixId((*d)->name(), DotNet::ICloneable, true),
+        writeMarshalUnmarshalCode(_out, (*d)->type(), fixId(*d, DotNet::ICloneable, true),
                                   false, false, false, patchParams.str());
     }
     _out << nl << "is__.endReadSlice();";
@@ -850,8 +848,7 @@ Slice::CsVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p, bool stream)
         _out << nl << "outS__.startSlice();";
         for(d = members.begin(); d != members.end(); ++d)
         {
-            writeMarshalUnmarshalCode(_out, (*d)->type(),
-                                      fixId((*d)->name(), DotNet::ICloneable, true),
+            writeMarshalUnmarshalCode(_out, (*d)->type(), fixId(*d, DotNet::ICloneable, true),
                                       true, true, false);
         }
         _out << nl << "outS__.endSlice();";
@@ -877,8 +874,7 @@ Slice::CsVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p, bool stream)
                     patchParams << ", " << classMemberCount++;
                 }
             }
-            writeMarshalUnmarshalCode(_out, (*d)->type(),
-                                      fixId((*d)->name(), DotNet::ICloneable, true),
+            writeMarshalUnmarshalCode(_out, (*d)->type(), fixId(*d, DotNet::ICloneable, true),
                                       false, true, false, patchParams.str());
         }
         _out << nl << "inS__.endSlice();";
@@ -2187,8 +2183,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
         _out << nl << "os__.startWriteSlice();";
         for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
         {
-            writeMarshalUnmarshalCode(_out, (*q)->type(),
-                                      fixId((*q)->name(), DotNet::ApplicationException),
+            writeMarshalUnmarshalCode(_out, (*q)->type(), fixId(*q, DotNet::ApplicationException),
                                       true, false, false);
         }
         _out << nl << "os__.endWriteSlice();";
@@ -2295,8 +2290,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
                     patchParams << ", " << classMemberCount++;
                 }
             }
-            writeMarshalUnmarshalCode(_out, (*q)->type(),
-                                      fixId((*q)->name(), DotNet::ApplicationException),
+            writeMarshalUnmarshalCode(_out, (*q)->type(), fixId((*q)->name(), DotNet::ApplicationException),
                                       false, false, false, patchParams.str());
         }
         _out << nl << "is__.endReadSlice();";
@@ -2314,8 +2308,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
             _out << nl << "outS__.startSlice();";
             for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
             {
-                writeMarshalUnmarshalCode(_out, (*q)->type(),
-                                          fixId((*q)->name(), DotNet::ApplicationException),
+                writeMarshalUnmarshalCode(_out, (*q)->type(), fixId((*q)->name(), DotNet::ApplicationException),
                                           true, true, false);
             }
             _out << nl << "outS__.endSlice();";
@@ -2345,8 +2338,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
                         patchParams << ", " << classMemberCount++;
                     }
                 }
-                writeMarshalUnmarshalCode(_out, (*q)->type(),
-                                          fixId((*q)->name(), DotNet::ApplicationException),
+                writeMarshalUnmarshalCode(_out, (*q)->type(), fixId((*q)->name(), DotNet::ApplicationException),
                                           false, true, false, patchParams.str());
             }
             _out << nl << "inS__.endSlice();";
@@ -2457,6 +2449,8 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
         _out << eb;
     }
 
+    bool propertyMapping = p->hasMetaData("clr:property");
+
     _out << sp << nl << "public " << name << spar;
     vector<string> paramDecl;
     vector<string> paramNames;
@@ -2471,7 +2465,12 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
     _out << sb;
     for(vector<string>::const_iterator i = paramNames.begin(); i != paramNames.end(); ++i)
     {
-        _out << nl << "this." << *i << " = " << *i << ';';
+        _out << nl << "this." << *i;
+        if(propertyMapping)
+        {
+            _out << "_prop";
+        }
+        _out << " = " << *i << ';';
     }
     _out << eb;
 
@@ -2595,8 +2594,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
         _out << sb;
         for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
         {
-            writeMarshalUnmarshalCode(_out, (*q)->type(),
-                                      fixId((*q)->name(), isClass ? DotNet::ICloneable : 0),
+            writeMarshalUnmarshalCode(_out, (*q)->type(), fixId(*q, isClass ? DotNet::ICloneable : 0),
                                       true, false, false);
         }
         _out << eb;
@@ -2688,8 +2686,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
                     patchParams << ", " << classMemberCount++;
                 }
             }
-            writeMarshalUnmarshalCode(_out, (*q)->type(),
-                                      fixId((*q)->name(), isClass ? DotNet::ICloneable : 0 ),
+            writeMarshalUnmarshalCode(_out, (*q)->type(), fixId(*q, isClass ? DotNet::ICloneable : 0 ),
                                       false, false, false, patchParams.str());
         }
         _out << eb;
@@ -2700,8 +2697,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
             _out << sb;
             for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
             {
-                writeMarshalUnmarshalCode(_out, (*q)->type(),
-                                          fixId((*q)->name(), isClass ? DotNet::ICloneable : 0),
+                writeMarshalUnmarshalCode(_out, (*q)->type(), fixId(*q, isClass ? DotNet::ICloneable : 0),
                                           true, true, false);
             }
             _out << eb;
@@ -2721,8 +2717,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
                         patchParams << ", " << classMemberCount++;
                     }
                 }
-                writeMarshalUnmarshalCode(_out, (*q)->type(),
-                                          fixId((*q)->name(), isClass ? DotNet::ICloneable : 0 ),
+                writeMarshalUnmarshalCode(_out, (*q)->type(), fixId(*q, isClass ? DotNet::ICloneable : 0 ),
                                           false, true, false, patchParams.str());
             }
             _out << eb;




More information about the fedora-extras-commits mailing list