aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/ScintillaDoc.html7
-rw-r--r--doc/ScintillaHistory.html3
-rw-r--r--scripts/HeaderOrder.txt1
-rw-r--r--src/CellBuffer.cxx3
-rw-r--r--src/RunStyles.cxx2
5 files changed, 14 insertions, 2 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html
index 5c92043cc..82829a947 100644
--- a/doc/ScintillaDoc.html
+++ b/doc/ScintillaDoc.html
@@ -10529,6 +10529,13 @@ EM_SETTARGETDEVICE
<td align="left"><code>DISABLE_D2D</code></td>
<td>(Win32) Build Scintilla without Direct2D/DirectWrite.</td>
</tr>
+
+ <tr>
+ <td align="left"><code>PTRDIFF_DOESNT_ALIAS_INT</code></td>
+ <td>Define if <code>ptrdiff_t*</code> does not alias <code>int*</code>.
+ This is detected automatically, but the check may be unreliable.
+ Try to define this symbol in case of errors about undefined symbols.</td>
+ </tr>
</tbody>
</table>
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 342a87d51..0e1394f7a 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -614,6 +614,9 @@
<a href="https://sourceforge.net/p/scintilla/feature-requests/1567/">Feature #1567</a>.
</li>
<li>
+ Add PTRDIFF_DOESNT_ALIAS_INT preprocessor choice.
+ </li>
+ <li>
On Win32, force autocompletion list colours to be opaque.
Enlarge bitmap to avoid visible blank background between items.
<a href="https://sourceforge.net/p/scintilla/bugs/2482/">Bug #2482</a>.
diff --git a/scripts/HeaderOrder.txt b/scripts/HeaderOrder.txt
index 12cd90726..5c6d2d58f 100644
--- a/scripts/HeaderOrder.txt
+++ b/scripts/HeaderOrder.txt
@@ -62,6 +62,7 @@
#include <mutex>
#include <thread>
#include <future>
+#include <type_traits>
// GTK headers
#include <glib.h>
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx
index 04486d4c6..3e9deb934 100644
--- a/src/CellBuffer.cxx
+++ b/src/CellBuffer.cxx
@@ -21,6 +21,7 @@
#include <optional>
#include <algorithm>
#include <memory>
+#include <type_traits>
#include "ScintillaTypes.h"
@@ -215,7 +216,7 @@ public:
}
void InsertLines(Sci::Line line, const Sci::Position *positions, size_t lines, bool lineStart) override {
const POS lineAsPos = pos_cast(line);
- if constexpr (sizeof(Sci::Position) == sizeof(POS)) {
+ if constexpr (std::is_convertible_v<Sci::Position *, POS *>) {
starts.InsertPartitions(lineAsPos, positions, lines);
} else {
starts.InsertPartitionsWithCast(lineAsPos, positions, lines);
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx
index 848670ba9..bca45c889 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(PTRDIFF_DOESNT_ALIAS_INT)
template class Scintilla::Internal::RunStyles<ptrdiff_t, int>;
template class Scintilla::Internal::RunStyles<ptrdiff_t, char>;
#endif