Skip to content

Commit

Permalink
Update release/3.1 to match Core (Xcode 14.3 fixes)
Browse files Browse the repository at this point in the history
  • Loading branch information
callumbirks committed Aug 16, 2023
2 parents 6da8ef6 + 8e10e3d commit 5bff6c1
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 10 deletions.
60 changes: 60 additions & 0 deletions Fleece.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1673,6 +1673,59 @@
};
name = Release;
};
D6D93DFF2A30122000E30981 /* Test_EE */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 2776AA45208A6C5A004ACE85 /* Project_Debug.xcconfig */;
buildSettings = {
};
name = Test_EE;
};
D6D93E002A30122000E30981 /* Test_EE */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 2776AA48208A6CED004ACE85 /* FleeceStaticLib.xcconfig */;
buildSettings = {
};
name = Test_EE;
};
D6D93E012A30122000E30981 /* Test_EE */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 27744AE5213F0E6A00399DCA /* FleeceBase.xcconfig */;
buildSettings = {
};
name = Test_EE;
};
D6D93E022A30122000E30981 /* Test_EE */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 27C4CEAA2127729D00470DE9 /* FleeceDylib.xcconfig */;
buildSettings = {
};
name = Test_EE;
};
D6D93E032A30122000E30981 /* Test_EE */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 27F25A8220A6559800E181FA /* FleeceMutableObjC.xcconfig */;
buildSettings = {
EXECUTABLE_PREFIX = lib;
HEADER_SEARCH_PATHS = /usr/local/include/;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator";
};
name = Test_EE;
};
D6D93E042A30122000E30981 /* Test_EE */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 2776AA49208A6E01004ACE85 /* FleeceTest.xcconfig */;
buildSettings = {
};
name = Test_EE;
};
D6D93E052A30122000E30981 /* Test_EE */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = fleece;
};
name = Test_EE;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand All @@ -1681,6 +1734,7 @@
buildConfigurations = (
270FA2651BF53CAD005DCB13 /* Debug */,
27744AB521372EB000399DCA /* Debug_EE */,
D6D93DFF2A30122000E30981 /* Test_EE */,
270FA2661BF53CAD005DCB13 /* Release */,
27744ABA21372EB800399DCA /* Release_EE */,
);
Expand All @@ -1692,6 +1746,7 @@
buildConfigurations = (
270FA2681BF53CAD005DCB13 /* Debug */,
27744AB621372EB000399DCA /* Debug_EE */,
D6D93E002A30122000E30981 /* Test_EE */,
270FA2691BF53CAD005DCB13 /* Release */,
27744ABB21372EB800399DCA /* Release_EE */,
);
Expand All @@ -1703,6 +1758,7 @@
buildConfigurations = (
272E5A501BF7FE5600848580 /* Debug */,
27744AB821372EB000399DCA /* Debug_EE */,
D6D93E042A30122000E30981 /* Test_EE */,
272E5A511BF7FE5600848580 /* Release */,
27744ABD21372EB800399DCA /* Release_EE */,
);
Expand All @@ -1714,6 +1770,7 @@
buildConfigurations = (
279AC5361C096872002C80DB /* Debug */,
27744AB921372EB000399DCA /* Debug_EE */,
D6D93E052A30122000E30981 /* Test_EE */,
279AC5371C096872002C80DB /* Release */,
27744ABE21372EB800399DCA /* Release_EE */,
);
Expand All @@ -1726,6 +1783,7 @@
27C4CEA42127719D00470DE9 /* Debug */,
27C4CEA52127719D00470DE9 /* Release */,
27744ADA2137452300399DCA /* Debug_EE */,
D6D93E022A30122000E30981 /* Test_EE */,
27744ADB2137452300399DCA /* Release_EE */,
);
defaultConfigurationIsVisible = 0;
Expand All @@ -1736,6 +1794,7 @@
buildConfigurations = (
27D7218E1F8E8EEA00AA4458 /* Debug */,
27744AB721372EB000399DCA /* Debug_EE */,
D6D93E032A30122000E30981 /* Test_EE */,
27D7218F1F8E8EEA00AA4458 /* Release */,
27744ABC21372EB800399DCA /* Release_EE */,
);
Expand All @@ -1748,6 +1807,7 @@
27DE2EDD2125FA1700123597 /* Debug */,
27DE2EDE2125FA1700123597 /* Release */,
27744AD82137452300399DCA /* Debug_EE */,
D6D93E012A30122000E30981 /* Test_EE */,
27744AD92137452300399DCA /* Release_EE */,
);
defaultConfigurationIsVisible = 0;
Expand Down
3 changes: 1 addition & 2 deletions Fleece/API_Impl/Fleece.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ FLTimestamp FLTimestamp_Now() FLAPI {

FLStringResult FLTimestamp_ToString(FLTimestamp timestamp, bool asUTC) FLAPI {
char str[kFormattedISO8601DateMaxSize];
FormatISO8601Date(str, timestamp, asUTC);
return FLSliceResult_CreateWith(str, strlen(str));
return FLSlice_Copy(FormatISO8601Date(str, timestamp, asUTC));
}


Expand Down
2 changes: 1 addition & 1 deletion Fleece/Core/Doc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ namespace fleece { namespace impl {
while (it->scope) it++;
auto node = sMemoryMap->extract(it);
node.value() = entry;
sMemoryMap->insert(move(node));
sMemoryMap->insert(std::move(node));
sMemoryMapTombstones--;
} else {
sMemoryMap->insert(iter, entry);
Expand Down
2 changes: 1 addition & 1 deletion Fleece/Mutable/HeapValue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ namespace fleece { namespace impl { namespace internal {
} else if (v) {
RetainedConst<Doc> doc = Doc::containing(v);
if (_usuallyTrue(doc != nullptr))
fleece::retain(move(doc));
fleece::retain(std::move(doc));
else if (!isHardwiredValue(v))
FleeceException::_throw(InvalidData,
"Can't retain immutable Value %p that's not part of a Doc",
Expand Down
2 changes: 1 addition & 1 deletion Fleece/Support/Backtrace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ namespace fleece {
void Backtrace::installTerminateHandler(function<void(const string&)> logger) {
static once_flag sOnce;
call_once(sOnce, [&] {
static auto const sLogger = move(logger);
static auto const sLogger = std::move(logger);
static terminate_handler const sOldHandler = set_terminate([] {
// ---- Code below gets called by C++ runtime on an uncaught exception ---
if (sLogger) {
Expand Down
4 changes: 2 additions & 2 deletions Fleece/Support/ConcurrentArena.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ namespace fleece {


ConcurrentArena::ConcurrentArena(ConcurrentArena &&other) {
*this = move(other);
*this = std::move(other);
}


ConcurrentArena& ConcurrentArena::operator=(ConcurrentArena &&other) {
_heap = move(other._heap);
_heap = std::move(other._heap);
_heapEnd = other._heapEnd;
_nextBlock = other._nextBlock.load();
return *this;
Expand Down
4 changes: 2 additions & 2 deletions Fleece/Support/ConcurrentMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ namespace fleece {


ConcurrentMap::ConcurrentMap(ConcurrentMap &&map) {
*this = move(map);
*this = std::move(map);
}


Expand All @@ -112,7 +112,7 @@ namespace fleece {
_capacity = map._capacity;
_count = map._count.load();
_entries = map._entries;
_heap = move(map._heap);
_heap = std::move(map._heap);
return *this;
}

Expand Down
16 changes: 16 additions & 0 deletions Tests/SupportTests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// the file licenses/APL2.txt.
//

#include "fleece/FLBase.h"
#include "FleeceTests.hh"
#include "FleeceImpl.hh"
#include "ConcurrentMap.hh"
Expand Down Expand Up @@ -328,3 +329,18 @@ TEST_CASE("Base64 encode and decode", "[Base64]") {
CHECK(decoded == in);
}
}


TEST_CASE("Timestamp Conversions", "[Timestamps]") {
FLTimestamp ts = FLTimestamp_Now();
bool asUTC = true;
SECTION("UTC") {
asUTC = true;
}
SECTION("Not UTC") {
asUTC = false;
}
FLStringResult str = FLTimestamp_ToString(ts, asUTC);
FLTimestamp ts2 = FLTimestamp_FromString((FLString)str);
CHECK(ts == ts2);
}
2 changes: 1 addition & 1 deletion Xcode/xcconfigs/FleeceTest.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//

// Workaround for Catch 2 requiring C++ features not available until macOS 10.12
MACOSX_DEPLOYMENT_TARGET = 10.12
MACOSX_DEPLOYMENT_TARGET = 10.14

CLANG_WARN__EXIT_TIME_DESTRUCTORS = NO
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) _LIBCPP_DEBUG=0
Expand Down

0 comments on commit 5bff6c1

Please sign in to comment.