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
commit5f88849f4e0784056efcea8aaea2138aebdf3dfe (patch)
tree230dfad2a29a04a38be156d3baeada019cb1e744 /cocoa
parent60e27aa2aaa19cdd2cd3bd6101ce28a42324ce9e (diff)
downloadscintilla-mirror-5f88849f4e0784056efcea8aaea2138aebdf3dfe.tar.gz
Standardized signature of TargetAsUTF8 and EncodedFromUTF8.
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 a54e3cfbb..8ed17d7de 100644
--- a/cocoa/ScintillaCocoa.h
+++ b/cocoa/ScintillaCocoa.h
@@ -106,8 +106,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 a9009f073..3be2c6b98 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -1574,7 +1574,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()) {
if (text)
@@ -1675,7 +1675,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()) {
if (encoded)