Skip to content

Commit af2c6fe

Browse files
committed
added manual modifictions to generated scintilla wrapper code to avoid truncation of 64bit pointers
1 parent e65c434 commit af2c6fe

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

PythonScript/src/ScintillaWrapper.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,7 +1873,7 @@ class ScintillaWrapper : public PyProducerConsumer<CallbackExecArgs>
18731873

18741874
/** Change the document object used.
18751875
*/
1876-
void SetDocPointer(int pointer);
1876+
void SetDocPointer(intptr_t pointer);
18771877

18781878
/** Set which document modification events are sent to the container.
18791879
*/
@@ -1948,11 +1948,11 @@ class ScintillaWrapper : public PyProducerConsumer<CallbackExecArgs>
19481948

19491949
/** Extend life of document.
19501950
*/
1951-
void AddRefDocument(int doc);
1951+
void AddRefDocument(intptr_t doc);
19521952

19531953
/** Release a reference to the document, deleting document if it fades to black.
19541954
*/
1955-
void ReleaseDocument(int doc);
1955+
void ReleaseDocument(intptr_t doc);
19561956

19571957
/** Get which document modification events are sent to the container.
19581958
*/
@@ -2944,7 +2944,7 @@ class ScintillaWrapper : public PyProducerConsumer<CallbackExecArgs>
29442944

29452945
/** For private communication between an application and a known lexer.
29462946
*/
2947-
intptr_t PrivateLexerCall(int operation, int pointer);
2947+
intptr_t PrivateLexerCall(intptr_t operation, intptr_t pointer);
29482948

29492949
/** Retrieve a '\n' separated list of properties understood by the current lexer.
29502950
* Result is NUL-terminated.

PythonScript/src/ScintillaWrapperGenerated.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3464,7 +3464,7 @@ intptr_t ScintillaWrapper::GetDocPointer()
34643464

34653465
/** Change the document object used.
34663466
*/
3467-
void ScintillaWrapper::SetDocPointer(int pointer)
3467+
void ScintillaWrapper::SetDocPointer(intptr_t pointer)
34683468
{
34693469
DEBUG_TRACE(L"ScintillaWrapper::SetDocPointer\n");
34703470
notAllowedInCallback("setDocPointer is not allowed in a synchronous callback. Use an asynchronous callback, or avoid using SetDocPointer in the callback.");
@@ -3612,15 +3612,15 @@ intptr_t ScintillaWrapper::CreateDocument()
36123612

36133613
/** Extend life of document.
36143614
*/
3615-
void ScintillaWrapper::AddRefDocument(int doc)
3615+
void ScintillaWrapper::AddRefDocument(intptr_t doc)
36163616
{
36173617
DEBUG_TRACE(L"ScintillaWrapper::AddRefDocument\n");
36183618
callScintilla(SCI_ADDREFDOCUMENT, 0, doc);
36193619
}
36203620

36213621
/** Release a reference to the document, deleting document if it fades to black.
36223622
*/
3623-
void ScintillaWrapper::ReleaseDocument(int doc)
3623+
void ScintillaWrapper::ReleaseDocument(intptr_t doc)
36243624
{
36253625
DEBUG_TRACE(L"ScintillaWrapper::ReleaseDocument\n");
36263626
callScintilla(SCI_RELEASEDOCUMENT, 0, doc);
@@ -5629,7 +5629,7 @@ boost::python::str ScintillaWrapper::GetLexerLanguage()
56295629

56305630
/** For private communication between an application and a known lexer.
56315631
*/
5632-
intptr_t ScintillaWrapper::PrivateLexerCall(int operation, int pointer)
5632+
intptr_t ScintillaWrapper::PrivateLexerCall(intptr_t operation, intptr_t pointer)
56335633
{
56345634
DEBUG_TRACE(L"ScintillaWrapper::PrivateLexerCall\n");
56355635
return callScintilla(SCI_PRIVATELEXERCALL, operation, pointer);

0 commit comments

Comments
 (0)