diff options
| -rw-r--r-- | cocoa/ScintillaCocoa.h | 4 | ||||
| -rw-r--r-- | cocoa/ScintillaCocoa.mm | 4 | ||||
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 8 | ||||
| -rw-r--r-- | gtk/ScintillaGTK.h | 4 | ||||
| -rw-r--r-- | win32/ScintillaWin.cxx | 4 | 
5 files changed, 12 insertions, 12 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) diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index a8b34e01b..47975d2ed 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -741,8 +741,8 @@ std::string ConvertText(const char *s, size_t len, const char *charSetDest,  // Returns the target converted to UTF8.  // Return the length in bytes. -int ScintillaGTK::TargetAsUTF8(char *text) { -	int targetLength = targetEnd - targetStart; +Sci::Position ScintillaGTK::TargetAsUTF8(char *text) const { +	Sci::Position targetLength = targetEnd - targetStart;  	if (IsUnicodeMode()) {  		if (text) {  			pdoc->GetCharRange(text, targetStart, targetLength); @@ -768,8 +768,8 @@ int ScintillaGTK::TargetAsUTF8(char *text) {  // Translates a nul terminated UTF8 string into the document encoding.  // Return the length of the result in bytes. -int ScintillaGTK::EncodedFromUTF8(char *utf8, char *encoded) const { -	int inputLength = (lengthForEncode >= 0) ? lengthForEncode : strlen(utf8); +Sci::Position ScintillaGTK::EncodedFromUTF8(const char *utf8, char *encoded) const { +	Sci::Position inputLength = (lengthForEncode >= 0) ? lengthForEncode : strlen(utf8);  	if (IsUnicodeMode()) {  		if (encoded) {  			memcpy(encoded, utf8, inputLength); diff --git a/gtk/ScintillaGTK.h b/gtk/ScintillaGTK.h index 07456a689..8a72b4002 100644 --- a/gtk/ScintillaGTK.h +++ b/gtk/ScintillaGTK.h @@ -85,8 +85,8 @@ private:  	void DisplayCursor(Window::Cursor c) override;  	bool DragThreshold(Point ptStart, Point ptNow) override;  	void StartDrag() override; -	int TargetAsUTF8(char *text); -	int EncodedFromUTF8(char *utf8, char *encoded) const; +	Sci::Position TargetAsUTF8(char *text) const; +	Sci::Position EncodedFromUTF8(const char *utf8, char *encoded) const;  	bool ValidCodePage(int codePage) const override;  public: 	// Public for scintilla_send_message  	sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) override; diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index dcb7d9334..cdb6cc472 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -306,7 +306,7 @@ class ScintillaWin :  	void StartDrag() override;  	static int MouseModifiers(uptr_t wParam); -	Sci::Position TargetAsUTF8(char *text); +	Sci::Position TargetAsUTF8(char *text) const;  	void AddCharUTF16(wchar_t const *wcs, unsigned int wclen);  	Sci::Position EncodedFromUTF8(const char *utf8, char *encoded) const;  	sptr_t WndPaint(uptr_t wParam); @@ -747,7 +747,7 @@ static std::wstring StringMapCase(const std::wstring &ws, DWORD mapFlags) {  // Returns the target converted to UTF8.  // Return the length in bytes. -Sci::Position ScintillaWin::TargetAsUTF8(char *text) { +Sci::Position ScintillaWin::TargetAsUTF8(char *text) const {  	Sci::Position targetLength = targetEnd - targetStart;  	if (IsUnicodeMode()) {  		if (text) { | 
