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 | de3131a78debeeb4997bba4a6dffec7384d3b4e6 (patch) | |
tree | 1b74b1fbab238227dd9951e23be93e3f3c99db9c /gtk/ScintillaGTK.cxx | |
parent | 20d6edd07a61856c02634971519c8519992d7346 (diff) | |
download | scintilla-mirror-de3131a78debeeb4997bba4a6dffec7384d3b4e6.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) { |