diff options
| author | Neil <nyamatongwe@gmail.com> | 2014-05-02 23:19:27 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2014-05-02 23:19:27 +1000 |
| commit | 42ce770c6497f865ce34a93f63cc376c3152f3c4 (patch) | |
| tree | fe434ad7ed4e7f63bb12c9fb1f4e128aacbd29ba /gtk/ScintillaGTK.cxx | |
| parent | 5a1126b68cbcd6b49534e9daa0eebe3a354e3f73 (diff) | |
| download | scintilla-mirror-42ce770c6497f865ce34a93f63cc376c3152f3c4.tar.gz | |
Use exact SciFnDirect function signature for DirectFunction as earlier version
depended on undefined behaviour.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index f13686077..0d868db63 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -309,7 +309,7 @@ private: #endif static gboolean PressCT(GtkWidget *widget, GdkEventButton *event, ScintillaGTK *sciThis); - static sptr_t DirectFunction(ScintillaGTK *sciThis, + static sptr_t DirectFunction(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam); }; @@ -2792,8 +2792,8 @@ gboolean ScintillaGTK::ExposeCT(GtkWidget *widget, GdkEventExpose * /*ose*/, Cal #endif sptr_t ScintillaGTK::DirectFunction( - ScintillaGTK *sciThis, unsigned int iMessage, uptr_t wParam, sptr_t lParam) { - return sciThis->WndProc(iMessage, wParam, lParam); + sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam) { + return reinterpret_cast<ScintillaGTK *>(ptr)->WndProc(iMessage, wParam, lParam); } sptr_t scintilla_send_message(ScintillaObject *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam) { |
