aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-04-25 16:26:57 +1000
committerNeil <nyamatongwe@gmail.com>2018-04-25 16:26:57 +1000
commite5bf102b598a88c1c13e4f83264b652e85c75f22 (patch)
treedde6b05c11bc47d544b352ce2df837e97f73ff74 /cocoa
parentacdf3d281be64973db955a6ae6ef4e1d5dac9a5c (diff)
downloadscintilla-mirror-e5bf102b598a88c1c13e4f83264b652e85c75f22.tar.gz
Backport: Standardized signature of TargetAsUTF8 and EncodedFromUTF8.
Backport of changeset 6737:5c4aea8a1e8a.
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/ScintillaCocoa.h4
-rw-r--r--cocoa/ScintillaCocoa.mm4
2 files changed, 4 insertions, 4 deletions
diff --git a/cocoa/ScintillaCocoa.h b/cocoa/ScintillaCocoa.h
index c893cf72e..ddfa205d6 100644
--- a/cocoa/ScintillaCocoa.h
+++ b/cocoa/ScintillaCocoa.h
@@ -108,8 +108,8 @@ private:
bool GetPasteboardData(NSPasteboard* board, SelectionText* selectedText);
void SetPasteboardData(NSPasteboard* board, const SelectionText& selectedText);
- ptrdiff_t TargetAsUTF8(char *text);
- ptrdiff_t EncodedFromUTF8(char *utf8, char *encoded) const;
+ Sci::Position TargetAsUTF8(char *text) const;
+ Sci::Position EncodedFromUTF8(const char *utf8, char *encoded) const;
int scrollSpeed;
int scrollTicks;
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index 8f6d2059f..b24e29a49 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -1648,7 +1648,7 @@ bool ScintillaCocoa::GetPasteboardData(NSPasteboard* board, SelectionText* selec
// Returns the target converted to UTF8.
// Return the length in bytes.
-ptrdiff_t ScintillaCocoa::TargetAsUTF8(char *text)
+Sci::Position ScintillaCocoa::TargetAsUTF8(char *text) const
{
const Sci::Position targetLength = targetEnd - targetStart;
if (IsUnicodeMode())
@@ -1756,7 +1756,7 @@ NSRect ScintillaCocoa::GetBounds() const {
// Translates a UTF8 string into the document encoding.
// Return the length of the result in bytes.
-ptrdiff_t ScintillaCocoa::EncodedFromUTF8(char *utf8, char *encoded) const
+Sci::Position ScintillaCocoa::EncodedFromUTF8(const char *utf8, char *encoded) const
{
const size_t inputLength = (lengthForEncode >= 0) ? lengthForEncode : strlen(utf8);
if (IsUnicodeMode())