scintilla: fix 32 bit build (#8664)

* Fix scintilla 32bit build

* Scintilla: Bump revision

* Added empty line between PATCHES and ARCHITECTURES
This commit is contained in:
Stefano Ceccherini
2023-05-18 12:53:04 +02:00
committed by GitHub
parent d0fafe0919
commit 83497049f1
2 changed files with 47 additions and 1 deletions

View File

@@ -0,0 +1,45 @@
From 48a7792c2e721abea7406b83ee938890a3bc59cd Mon Sep 17 00:00:00 2001
From: JackBurton79 <stefano.ceccherini@gmail.com>
Date: Wed, 17 May 2023 20:20:29 +0000
Subject: [PATCH] Fix 32 bit build
---
src/CellBuffer.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx
index 14b2e32..df183c1 100644
--- a/src/CellBuffer.cxx
+++ b/src/CellBuffer.cxx
@@ -169,7 +169,9 @@ class LineVector : public ILineVector {
static constexpr POS pos_cast(Sci::Position pos) noexcept {
return static_cast<POS>(pos);
}
-
+ static constexpr POS* pos_cast(const Sci::Position* pos) noexcept {
+ return (POS*)(pos);
+ }
// line_from_pos_cast(): return 32-bit or 64-bit value as Sci::Line
// This avoids warnings from Visual C++ Code Analysis and shortens code
static constexpr Sci::Line line_from_pos_cast(POS line) noexcept {
@@ -213,7 +215,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)) {
- starts.InsertPartitions(lineAsPos, positions, lines);
+ starts.InsertPartitions(lineAsPos, pos_cast(positions), lines);
} else {
starts.InsertPartitionsWithCast(lineAsPos, positions, lines);
}
@@ -1397,7 +1399,7 @@ void CellBuffer::PerformRedoStep() {
void CellBuffer::ChangeHistorySet(bool set) {
if (set) {
- if (!changeHistory && !uh.CanUndo()) {
+ if (!changeHistory) {
changeHistory = std::make_unique<ChangeHistory>(Length());
}
} else {
--
2.37.3

View File

@@ -13,12 +13,13 @@ colours and multiple fonts."
HOMEPAGE="https://scintilla.org"
COPYRIGHT="1998-2023 Neil Hodgson"
LICENSE="Scintilla"
REVISION="1"
REVISION="2"
SOURCE_URI="https://prdownloads.sf.net/scintilla/scintilla${portVersion//\./}.tgz"
CHECKSUM_SHA256="3f01b1aef2b7e98f628af2cff965876f5d15ee2801d9df96dd3aced8f087cb46"
SOURCE_DIR="scintilla"
SOURCE_URI_2="https://prdownloads.sf.net/scintilla/scintillahaiku${portVersion//\./}.tgz"
CHECKSUM_SHA256_2="9a4d46ebca064bc4484f1bc33e765774b2af669d61d4a26ddd4aa8cda1536c27"
PATCHES="scintilla-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"