rpms/ice/devel 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 534d1192152933-patch-4-ice-3-2-1-fix-slice2cs-ice-3.2.1-patch4.txt, NONE, 1.1 ice.spec, 1.4, 1.5

Mary Ellen Foster (mef) fedora-extras-commits at redhat.com
Tue Oct 30 18:06:05 UTC 2007


Author: mef

Update of /cvs/pkgs/rpms/ice/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9537/devel

Modified Files:
	ice.spec 
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 
	534d1192152933-patch-4-ice-3-2-1-fix-slice2cs-ice-3.2.1-patch4.txt 
Log Message:
Add extra patches from ZeroC and fix template problem



--- 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;


--- NEW FILE 534d1192152933-patch-4-ice-3-2-1-fix-slice2cs-ice-3.2.1-patch4.txt ---
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp
index 387de74..0f4ff68 100755
--- a/cpp/src/Slice/CsUtil.cpp
+++ b/cpp/src/Slice/CsUtil.cpp
@@ -479,21 +479,40 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out,
     {
         if(marshal)
         {
-            if(streamingAPI)
+            if(!isValueType(st))
             {
-                out << nl << param << ".ice_write(" << stream << ");";
+                out << nl << "if(" << param << " == null)";
+                out << sb;
+                string typeS = typeToString(st);
+                out << nl << typeS << " " << "tmp__ = new " << typeS << "();";
+                out << nl << "tmp__.";
+                out << (streamingAPI ? "ice_write" : "write__") << "(" << stream << ");";
+                out << eb;
+                out << nl << "else";
+                out << sb;
+                out << nl << param << "." << (streamingAPI ? "ice_write" : "write__") << "(" << stream << ");";
+                out << eb;
             }
             else
             {
-                out << nl << param << ".write__(" << stream << ");";
+                if(streamingAPI)
+                {
+                    out << nl << param << ".ice_write(" << stream << ");";
+                }
+                else
+                {
+                    out << nl << param << ".write__(" << stream << ");";
+                }
             }
         }
         else
         {
-            string typeS = typeToString(type);
-            if(param.size() < 6 || param.substr(param.size() - 5) != "_prop")
+            if(!isValueType(st))
             {
-                out << nl << param << " = new " << typeS << "();";
+                out << nl << "if(" << param << " == null)";
+                out << sb;
+                out << nl << param << " = new " << typeToString(type) << "();";
+                out << eb;
             }
             if(streamingAPI)
             {
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 80c096b..6083631 100755
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -386,6 +386,18 @@ Slice::CsVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p, bool stream)
                 if(!isClass)
                 {
                     _out << nl << typeS << ' ' << param << ';';
+                    StructPtr st = StructPtr::dynamicCast(q->first);
+                    if(st)
+                    {
+                        if(isValueType(q->first))
+                        {
+                            _out << nl << param << " = new " << typeS << "();";
+                        }
+                        else
+                        {
+                            _out << nl << param << " = null;";
+                        }
+                    }
                 }
                 writeMarshalUnmarshalCode(_out, q->first, param, false, false, true);
             }
@@ -501,12 +513,26 @@ Slice::CsVisitor::writeDispatchAndMarshalling(const ClassDefPtr& p, bool stream)
             //
             for(q = inParams.begin(); q != inParams.end(); ++q)
             {
+                string param = fixId(q->second);
+                string typeS = typeToString(q->first);
                 BuiltinPtr builtin = BuiltinPtr::dynamicCast(q->first);
                 bool isClass = (builtin && builtin->kind() == Builtin::KindObject)
                                || ClassDeclPtr::dynamicCast(q->first);
                 if(!isClass)
                 {
-                    _out << nl << typeToString(q->first) << ' ' << fixId(q->second) << ';';
+                    _out << nl << typeS << ' ' << param << ';';
+                    StructPtr st = StructPtr::dynamicCast(q->first);
+                    if(st)
+                    {
+                        if(isValueType(q->first))
+                        {
+                            _out << nl << param << " = new " << typeS << "();";
+                        }
+                        else
+                        {
+                            _out << nl << param << " = null;";
+                        }
+                    }
                 }
                 writeMarshalUnmarshalCode(_out, q->first, fixId(q->second), false, false, true);
             }
@@ -2436,6 +2462,8 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
     DataMemberList dataMembers = p->dataMembers();
     DataMemberList::const_iterator q;
 
+    bool propertyMapping = p->hasMetaData("clr:property");
+
     _out << sp << nl << "#endregion"; // Slice data members
 
     bool isClass = !isValueType(p);
@@ -2446,17 +2474,34 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
         _out << "s";
         _out << sp << nl << "public " << name << "()";
         _out << sb;
+        /*
+        if(!p->isLocal())
+        {
+            for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
+            {
+                if(!isValueType((*q)->type()))
+                {
+                    string memberName = fixId((*q)->name(), isClass ? DotNet::ICloneable : 0);
+                    string memberType = typeToString((*q)->type());
+                    _out << nl << "this." << memberName;
+                    if(propertyMapping)
+                    {
+                        _out << "_prop";
+                    }
+                    _out << " = new " << memberType << "();";
+                }
+            }
+        }
+        */
         _out << eb;
     }
 
-    bool propertyMapping = p->hasMetaData("clr:property");
-
     _out << sp << nl << "public " << name << spar;
     vector<string> paramDecl;
     vector<string> paramNames;
     for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
     {
-        string memberName = fixId((*q)->name());
+        string memberName = fixId((*q)->name(), isClass ? DotNet::ICloneable : 0);
         string memberType = typeToString((*q)->type());
         paramDecl.push_back(memberType + " " + memberName);
         paramNames.push_back(memberName);
@@ -3916,10 +3961,35 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
     _out << nl << "for(int i__ = 0; i__ < sz__; ++i__)";
     _out << sb;
     _out << nl << keyS << " k__;";
+    StructPtr st = StructPtr::dynamicCast(key);
+    if(st)
+    {
+        if(isValueType(key))
+        {
+            _out << nl << "v__ = new " << typeToString(key) << "();";
+        }
+        else
+        {
+            _out << nl << "k__ = null;";
+        }
+    }
     writeMarshalUnmarshalCode(_out, key, "k__", false, false, false);
     if(!hasClassValue)
     {
         _out << nl << valueS << " v__;";
+
+        StructPtr st = StructPtr::dynamicCast(value);
+        if(st)
+        {
+            if(isValueType(value))
+            {
+                _out << nl << "v__ = new " << typeToString(value) << "();";
+            }
+            else
+            {
+                _out << nl << "v__ = null;";
+            }
+        }
     }
     writeMarshalUnmarshalCode(_out, value, "v__", false, false, false, "r__, k__");
     if(!hasClassValue)
@@ -3956,10 +4026,34 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
         _out << nl << "for(int i__ = 0; i__ < sz__; ++i__)";
         _out << sb;
         _out << nl << keyS << " k__;";
+        StructPtr st = StructPtr::dynamicCast(key);
+        if(st)
+        {
+            if(isValueType(key))
+            {
+                _out << nl << "v__ = new " << typeToString(key) << "();";
+            }
+            else
+            {
+                _out << nl << "k__ = null;";
+            }
+        }
         writeMarshalUnmarshalCode(_out, key, "k__", false, true, false);
         if(!hasClassValue)
         {
             _out << nl << valueS << " v__;";
+            StructPtr st = StructPtr::dynamicCast(value);
+            if(st)
+            {
+                if(isValueType(value))
+                {
+                    _out << nl << "v__ = new " << typeToString(value) << "();";
+                }
+                else
+                {
+                    _out << nl << "v__ = null;";
+                }
+            }
         }
         writeMarshalUnmarshalCode(_out, value, "v__", false, true, false, "r__, k__");
         if(!hasClassValue)
@@ -4192,7 +4286,20 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p)
         _out << eb;
         for(q = outParams.begin(); q != outParams.end(); ++q)
         {
-            writeMarshalUnmarshalCode(_out, q->first, fixId(q->second), false, false, true, "");
+            string param = fixId(q->second);
+            StructPtr st = StructPtr::dynamicCast(q->first);
+            if(st)
+            {
+                if(isValueType(q->first))
+                {
+                    _out << nl << param << " = new " << typeToString(q->first) << "();";
+                }
+                else
+                {
+                    _out << nl << param << " = null;";
+                }
+            }
+            writeMarshalUnmarshalCode(_out, q->first, param, false, false, true, "");
         }
         if(ret)
         {
@@ -4208,6 +4315,18 @@ Slice::Gen::DelegateMVisitor::visitClassDefStart(const ClassDefPtr& p)
             else
             {
                 _out << nl << retS << " ret__;";
+                StructPtr st = StructPtr::dynamicCast(ret);
+                if(st)
+                {
+                    if(isValueType(st))
+                    {
+                        _out << nl << "ret__ = new " << retS << "();";
+                    }
+                    else
+                    {
+                        _out << nl << "ret__ = null;";
+                    }
+                }
                 writeMarshalUnmarshalCode(_out, ret, "ret__", false, false, true, "");
             }
         }
@@ -4618,7 +4737,9 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
         _out << sb;
         for(q = outParams.begin(); q != outParams.end(); ++q)
         {
-            _out << nl << typeToString(q->first) << ' ' << fixId(q->second) << ';';
+            string param = fixId(q->second);
+            string typeS = typeToString(q->first);
+            _out << nl << typeS << ' ' << param << ';';
         }
         if(ret)
         {
@@ -4646,10 +4767,33 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
         _out << eb;
         for(q = outParams.begin(); q != outParams.end(); ++q)
         {
+            string param = fixId(q->second);
+            StructPtr st = StructPtr::dynamicCast(q->first);
+            if(st)
+            if(isValueType(st))
+            {
+                _out << nl << param << " = new " << typeToString(q->first) << "();";
+            }
+            else
+            {
+                _out << nl << param << " = null;";
+            }
             writeMarshalUnmarshalCode(_out, q->first, fixId(q->second), false, false, true);
         }
         if(ret)
         {
+            StructPtr st = StructPtr::dynamicCast(ret);
+            if(st)
+            {
+                if(isValueType(ret))
+                {
+                    _out << nl << "ret__ = new " << retS << "();";
+                }
+                else
+                {
+                    _out << nl << "ret__ = null;";
+                }
+            }
             writeMarshalUnmarshalCode(_out, ret, "ret__", false, false, true);
         }
         if(p->returnsClasses())


Index: ice.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ice/devel/ice.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ice.spec	7 Sep 2007 08:37:21 -0000	1.4
+++ ice.spec	30 Oct 2007 18:05:32 -0000	1.5
@@ -10,7 +10,7 @@
 
 Name: ice
 Version: 3.2.1
-Release: 11%{?dist}
+Release: 12%{?dist}
 Summary: The Ice base runtime and services
 
 Group: System Environment/Libraries
@@ -36,6 +36,11 @@
 Patch6:         Ice-3.2.0-dont-build-test.patch
 Patch7:         IceCS-3.2.1-dont-build-test.patch
 Patch8:         IceCS-3.2.1-use-gac.patch
+Patch9:         http://www.zeroc.com/forums/attachments/patches/527d1189575595-patch-1-ice-3-2-1-icedotnet-patch1.txt
+Patch10:        http://www.zeroc.com/forums/attachments/patches/530d1190105491-patch-2-ice-3-2-1-fix-icegrid-application-update-bug-patch.txt
+Patch11:        http://www.zeroc.com/forums/attachments/patches/531d1190619626-patch-3-ice-3-2-1-fix-slice2cs-ice-3.2.1-patch3.txt
+Patch12:        http://www.zeroc.com/forums/attachments/patches/534d1192152933-patch-4-ice-3-2-1-fix-slice2cs-ice-3.2.1-patch4.txt
+Patch13:        Ice-3.2.1-template-path.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 # Ice doesn't officially support this architecture at all
@@ -181,6 +186,10 @@
 %prep
 %setup -n Ice-%{version} -q
 %patch6 -p1
+%patch9 -p2
+%patch10 -p2
+%patch11 -p2
+%patch12 -p2
 
 # Fix some permission issues/
 chmod a-x config/*.py
@@ -192,6 +201,7 @@
 %setup -c -q -n Ice-rpmbuild-%{version} -T -b 1
 %patch0 -p1
 %patch1 -p1
+%patch13 -p1
 
 %setup -q -n IceJ-%{version}-java5 -T -b 2
 %patch2 -p1
@@ -231,6 +241,7 @@
 cd $RPM_BUILD_DIR/IceJ-%{version}-java5/ant
 rm *.class
 javac -d . -source 1.4 -target 1.4 *.java
+jar cvf ant-ice-%{version}.jar *.class
 
 # Build the Java stuff
 cd $RPM_BUILD_DIR/IceJ-%{version}-java5
@@ -289,7 +300,7 @@
 mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
 cp -p %{SOURCE8} ${RPM_BUILD_ROOT}%{_bindir}
 sed -i -e "s#DIR#%{_datadir}/Ice-%{version}#" $RPM_BUILD_ROOT%{_bindir}/icegridgui
-desktop-file-install --vendor="zeroc" \
+desktop-file-install \
         --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
         %{SOURCE9}
 %endif
@@ -373,8 +384,9 @@
 mv $RPM_BUILD_ROOT/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/Ice-%{version}/LICENSE
 
 # Copy the Ant task files into the right place
-mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/Ice-%{version}
-cp -p -r ${RPM_BUILD_DIR}/IceJ-%{version}-java5/ant/ ${RPM_BUILD_ROOT}%{_datadir}/Ice-%{version}
+mkdir -p ${RPM_BUILD_ROOT}%{_javadir}
+cp -p -r ${RPM_BUILD_DIR}/IceJ-%{version}-java5/ant/ant-ice-%{version}.jar ${RPM_BUILD_ROOT}%{_javadir}
+ln -s ant-ice-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/ant-ice.jar
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -521,7 +533,8 @@
 %defattr(-,root,root,-)
 %{_bindir}/slice2java
 %{_bindir}/slice2freezej
-%{_datadir}/Ice-%{version}/ant
+%{_javadir}/ant-ice-%{version}.jar
+%{_javadir}/ant-ice.jar
 
 %files csharp
 %defattr(-,root,root,-)
@@ -581,6 +594,11 @@
 %config(noreplace) %{_sysconfdir}/php.d/ice.ini
 
 %changelog
+* Tue Oct 30 2007 Mary Ellen Foster <mefoster at gmail.com> 3.2.1-12
+- Put the slice2java classes into a .jar file instead of as bare classes
+- Incorporate all Ice 3.2.1 patches from ZeroC
+- Fix templates path in icegridregistry.conf
+
 * Fri Sep  7 2007 Mary Ellen Foster <mefoster at gmail.com> 3.2.1-11
 - Also add Obsoletes: for the old zeroc names
 - Fix bad date in changelog




More information about the fedora-extras-commits mailing list