Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into java-compat-removal2
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Dec 19, 2023
2 parents 0511f1e + 8fa9eaf commit 624e407
Show file tree
Hide file tree
Showing 15 changed files with 186 additions and 198 deletions.
2 changes: 1 addition & 1 deletion cpp/include/Ice/MetricsObserverI.h
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ class ObserverFactoryT : public Updater, private IceUtil::Mutex
IceInternal::MetricsAdminIPtr _metrics;
const std::string _name;
MetricsMapSeqType _maps;
std::atomic<int> _enabled;
std::atomic<bool> _enabled;
UpdaterPtr _updater;
};

Expand Down
1 change: 1 addition & 0 deletions cpp/include/IceUtil/Shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define ICE_UTIL_SHARED_H

#include <IceUtil/Config.h>
#include <atomic>

//
// Base classes for reference counted types. The IceUtil::Handle
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/Ice/Instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class Timer : public IceUtil::Timer
virtual void runTimerTask(const IceUtil::TimerTaskPtr&);

IceUtil::Mutex _mutex;
std::atomic<int> _hasObserver;
std::atomic<bool> _hasObserver;
ObserverHelperT<Ice::Instrumentation::ThreadObserver> _observer;
};

Expand Down
13 changes: 0 additions & 13 deletions cpp/src/slice2cs/CsUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2142,18 +2142,12 @@ Slice::CsGenerator::MetaDataVisitor::visitUnitStart(const UnitPtr& p)
StringList globalMetaData = dc->getMetaData();
StringList newGlobalMetaData;
static const string csPrefix = "cs:";
static const string clrPrefix = "clr:";

for(StringList::iterator r = globalMetaData.begin(); r != globalMetaData.end(); ++r)
{
string& s = *r;
string oldS = s;

if(s.find(clrPrefix) == 0)
{
s.replace(0, clrPrefix.size(), csPrefix);
}

if(s.find(csPrefix) == 0)
{
static const string csAttributePrefix = csPrefix + "attribute:";
Expand Down Expand Up @@ -2293,13 +2287,6 @@ Slice::CsGenerator::MetaDataVisitor::validate(const ContainedPtr& cont)
string oldS = s;

const string csPrefix = "cs:";
const string clrPrefix = "clr:";

if(s.find(clrPrefix) == 0)
{
s.replace(0, clrPrefix.size(), csPrefix);
}

if(s.find(csPrefix) == 0)
{
SequencePtr seq = SequencePtr::dynamicCast(cont);
Expand Down
12 changes: 6 additions & 6 deletions csharp/test/Ice/defaultValue/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ struct Struct2
// the string members, but we use metadata to force it to be mapped
// to a class.
//
["clr:class"]
["cs:class"]
struct Struct3
{
bool boolFalse = false;
Expand Down Expand Up @@ -130,7 +130,7 @@ struct Struct3

//
// Struct4 would normally map to a C# struct because we have omitted
// the string members, and don't contains clr:class metadata, but as it
// the string members, and don't contains cs:class metadata, but as it
// contains default values it is mapped to a class.
//
struct Struct4
Expand Down Expand Up @@ -221,7 +221,7 @@ exception DerivedEx extends BaseEx
Nested::Color nc3 = ConstNestedColor3;
}

["clr:property"]
["cs:property"]
class ClassProperty
{
bool boolFalse = false;
Expand All @@ -242,7 +242,7 @@ class ClassProperty
double zeroDotD = 0;
}

["clr:property"]
["cs:property"]
struct StructProperty
{
bool boolFalse = false;
Expand All @@ -264,10 +264,10 @@ struct StructProperty
}

//
// Exceptions don't support "clr:property" metadata, but
// Exceptions don't support "cs:property" metadata, but
// we want to ensure that the generated code compiles.
//
["clr:property"]
["cs:property"]
exception ExceptionProperty
{
bool boolFalse = false;
Expand Down
4 changes: 2 additions & 2 deletions csharp/test/Ice/dictMapping/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ struct TEstNv
}

sequence<int> AIS;
["clr:generic:List"] sequence<int> GIS;
["cs:generic:List"] sequence<int> GIS;

sequence<string> ASS;
["clr:generic:List"] sequence<string> GSS;
["cs:generic:List"] sequence<string> GSS;

dictionary<string, AIS> NDAIS;
dictionary<string, GIS> NDGIS;
Expand Down
4 changes: 2 additions & 2 deletions csharp/test/Ice/dictMapping/TestAMD.ice
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ dictionary<string, NV> NDV;
dictionary<string, NR> NDR;

sequence<int> AIS;
["clr:generic:List"] sequence<int> GIS;
["cs:generic:List"] sequence<int> GIS;

sequence<string> ASS;
["clr:generic:List"] sequence<string> GSS;
["cs:generic:List"] sequence<string> GSS;

dictionary<string, AIS> NDAIS;
dictionary<string, GIS> NDGIS;
Expand Down
8 changes: 4 additions & 4 deletions csharp/test/Ice/optional/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct VarStruct
string m;
}

["clr:class"]
["cs:class"]
struct ClassVarStruct
{
int a;
Expand All @@ -50,9 +50,9 @@ sequence<double> DoubleSeq;
sequence<string> StringSeq;
sequence<MyEnum> MyEnumSeq;
sequence<SmallStruct> SmallStructSeq;
["clr:generic:List"] sequence<SmallStruct> SmallStructList;
["cs:generic:List"] sequence<SmallStruct> SmallStructList;
sequence<FixedStruct> FixedStructSeq;
["clr:generic:LinkedList"] sequence<FixedStruct> FixedStructList;
["cs:generic:LinkedList"] sequence<FixedStruct> FixedStructList;
sequence<VarStruct> VarStructSeq;
sequence<OneOptional> OneOptionalSeq;
sequence<OneOptional*> OneOptionalPrxSeq;
Expand Down Expand Up @@ -150,7 +150,7 @@ exception RequiredException extends OptionalException
OneOptional o2;
}

["clr:property"]
["cs:property"]
class OptionalWithCustom
{
optional(1) SmallStructList l;
Expand Down
8 changes: 4 additions & 4 deletions csharp/test/Ice/optional/TestAMD.ice
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct VarStruct
string m;
}

["clr:class"]
["cs:class"]
struct ClassVarStruct
{
int a;
Expand All @@ -50,9 +50,9 @@ sequence<double> DoubleSeq;
sequence<string> StringSeq;
sequence<MyEnum> MyEnumSeq;
sequence<SmallStruct> SmallStructSeq;
["clr:generic:List"] sequence<SmallStruct> SmallStructList;
["cs:generic:List"] sequence<SmallStruct> SmallStructList;
sequence<FixedStruct> FixedStructSeq;
["clr:generic:LinkedList"] sequence<FixedStruct> FixedStructList;
["cs:generic:LinkedList"] sequence<FixedStruct> FixedStructList;
sequence<VarStruct> VarStructSeq;
sequence<OneOptional> OneOptionalSeq;
sequence<OneOptional*> OneOptionalPrxSeq;
Expand Down Expand Up @@ -150,7 +150,7 @@ exception RequiredException extends OptionalException
OneOptional o2;
}

["clr:property"]
["cs:property"]
class OptionalWithCustom
{
optional(1) SmallStructList l;
Expand Down
Loading

0 comments on commit 624e407

Please sign in to comment.