aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-08-21 23:04:57 +0000
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-08-21 23:04:57 +0000
commit7ccb74055fd37f22de83e4fbe42c146b6dd5656d (patch)
tree81bf75571aaab38c773bfb9b473466ea95ef1feb
parent26df8def5e3ad506c514a42262d98584011d5446 (diff)
downloadscintilla-mirror-7ccb74055fd37f22de83e4fbe42c146b6dd5656d.tar.gz
support NetBSD on ARMv6sciteco-rel-5-5-4
* LineVector<T> is only instantiated for Sci::Position. It instantiates Partitioning<T> as well and Partitioning<T>::InsertPartitions() is called with a Sci::Position. This only couldn't cause problems if ptrdiff_t aliases to int. In either case, I don't see why we need LineVector<int> at all. * We need RunStyles<ptrdiff_t> as well since ptrdiff_t is long int and we instantiate only RunStyles<int>. Both types have the same storage size but are still different. See also this discussion about the same workaround for Haiku: https://groups.google.com/g/scintilla-interest/c/xPXquJUIXo8/m/BLXBpTTgBwAJ
-rw-r--r--src/CellBuffer.cxx5
-rw-r--r--src/RunStyles.cxx2
2 files changed, 2 insertions, 5 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx
index 643929352..3bdbd7730 100644
--- a/src/CellBuffer.cxx
+++ b/src/CellBuffer.cxx
@@ -338,10 +338,7 @@ CellBuffer::CellBuffer(bool hasStyles_, bool largeDocument_) :
utf8LineEnds = LineEndType::Default;
collectingUndo = true;
uh = std::make_unique<UndoHistory>();
- if (largeDocument)
- plv = std::make_unique<LineVector<Sci::Position>>();
- else
- plv = std::make_unique<LineVector<int>>();
+ plv = std::make_unique<LineVector<Sci::Position>>();
}
CellBuffer::~CellBuffer() noexcept = default;
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx
index 848670ba9..508ab5ba4 100644
--- a/src/RunStyles.cxx
+++ b/src/RunStyles.cxx
@@ -321,7 +321,7 @@ void RunStyles<DISTANCE, STYLE>::Check() const {
template class Scintilla::Internal::RunStyles<int, int>;
template class Scintilla::Internal::RunStyles<int, char>;
-#if (PTRDIFF_MAX != INT_MAX) || defined(__HAIKU__)
+#if (PTRDIFF_MAX != INT_MAX) || defined(__HAIKU__) || defined(__NetBSD__)
template class Scintilla::Internal::RunStyles<ptrdiff_t, int>;
template class Scintilla::Internal::RunStyles<ptrdiff_t, char>;
#endif