rpms/ice/F-7 534d1192152933-patch-4-ice-3-2-1-fix-slice2cs-ice-3.2.1-patch4.txt, NONE, 1.1 Ice-3.2.1-template-path.patch, NONE, 1.1 ice.spec, 1.5, 1.6
Mary Ellen Foster (mef)
fedora-extras-commits at redhat.com
Tue Oct 30 18:05:58 UTC 2007
- Previous message (by thread): [pkgdb] dmraid: bmr has requested watchcommits
- Next message (by thread): rpms/ice/F-8 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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mef
Update of /cvs/pkgs/rpms/ice/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9537/F-7
Modified Files:
ice.spec
Added Files:
534d1192152933-patch-4-ice-3-2-1-fix-slice2cs-ice-3.2.1-patch4.txt
Ice-3.2.1-template-path.patch
Log Message:
Add extra patches from ZeroC and fix template problem
--- 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())
Ice-3.2.1-template-path.patch:
--- NEW FILE Ice-3.2.1-template-path.patch ---
--- Ice-rpmbuild-3.2.1/icegridregistry.conf 2007-03-08 20:59:15.000000000 +0000
+++ Ice-rpmbuild-3.2.1/icegridregistry.conf.new 2007-10-30 14:35:33.000000000 +0000
@@ -42,7 +42,7 @@
#
# Default templates
#
-IceGrid.Registry.DefaultTemplates=/usr/share/Ice-3.2.0/templates.xml
+IceGrid.Registry.DefaultTemplates=/usr/share/Ice-3.2.1/templates.xml
#
# Logging to syslog
Index: ice.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ice/F-7/ice.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ice.spec 26 Sep 2007 08:45:42 -0000 1.5
+++ ice.spec 30 Oct 2007 18:05:21 -0000 1.6
@@ -39,6 +39,8 @@
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
@@ -187,6 +189,7 @@
%patch9 -p2
%patch10 -p2
%patch11 -p2
+%patch12 -p2
# Fix some permission issues/
chmod a-x config/*.py
@@ -198,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
@@ -296,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
@@ -529,7 +533,6 @@
%defattr(-,root,root,-)
%{_bindir}/slice2java
%{_bindir}/slice2freezej
-%{_datadir}/Ice-%{version}/ant
%{_javadir}/ant-ice-%{version}.jar
%{_javadir}/ant-ice.jar
@@ -591,9 +594,10 @@
%config(noreplace) %{_sysconfdir}/php.d/ice.ini
%changelog
-* Wed Sep 26 2007 Mary Ellen Foster <mefoster at gmail.com> 3.2.1-12
+* 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 patches from ZeroC
+- 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
- Previous message (by thread): [pkgdb] dmraid: bmr has requested watchcommits
- Next message (by thread): rpms/ice/F-8 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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list