aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaCocoa.mm
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-05-02 23:19:27 +1000
committerNeil <nyamatongwe@gmail.com>2014-05-02 23:19:27 +1000
commit42ce770c6497f865ce34a93f63cc376c3152f3c4 (patch)
treefe434ad7ed4e7f63bb12c9fb1f4e128aacbd29ba /cocoa/ScintillaCocoa.mm
parent5a1126b68cbcd6b49534e9daa0eebe3a354e3f73 (diff)
downloadscintilla-mirror-42ce770c6497f865ce34a93f63cc376c3152f3c4.tar.gz
Use exact SciFnDirect function signature for DirectFunction as earlier version
depended on undefined behaviour.
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
-rw-r--r--cocoa/ScintillaCocoa.mm6
1 files changed, 3 insertions, 3 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index 563cff839..7e86d86f1 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -787,16 +787,16 @@ void ScintillaCocoa::Redraw()
* However this is a Windows metaphor and not used here, hence we just call our fake
* window proc. The given parameters directly reflect the message parameters used on Windows.
*
- * @param sciThis The target which is to be called.
+ * @param ptr The target which is to be called.
* @param iMessage A code that indicates which message was sent.
* @param wParam One of the two free parameters for the message. Traditionally a word sized parameter
* (hence the w prefix).
* @param lParam The other of the two free parameters. A signed long.
*/
-sptr_t ScintillaCocoa::DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam,
+sptr_t ScintillaCocoa::DirectFunction(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
sptr_t lParam)
{
- return sciThis->WndProc(iMessage, wParam, lParam);
+ return reinterpret_cast<ScintillaCocoa *>(ptr)->WndProc(iMessage, wParam, lParam);
}
//--------------------------------------------------------------------------------------------------