From d8931f1d77ee4f032eb5cf1ecff2c8b51fff1f31 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 9 Jun 2017 12:48:20 +1000 Subject: Use 64-bit safe type for return from Scintilla. Allows pointer returning methods like GetRangePointer to work in 64-bit code. --- test/ScintillaCallable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ScintillaCallable.py b/test/ScintillaCallable.py index 6a27def22..44faac649 100644 --- a/test/ScintillaCallable.py +++ b/test/ScintillaCallable.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals import ctypes, os, sys -from ctypes import c_int, c_ulong, c_char_p, c_wchar_p, c_ushort, c_uint, c_long +from ctypes import c_int, c_ulong, c_char_p, c_wchar_p, c_ushort, c_uint, c_long, c_ssize_t class TEXTRANGE(ctypes.Structure): _fields_= (\ @@ -42,7 +42,7 @@ class SciCall: ll = ctypes.cast(l, c_char_p) return self._fn(self._ptr, self._msg, ww, ll) -sciFX = ctypes.CFUNCTYPE(c_long, c_char_p, c_int, c_char_p, c_char_p) +sciFX = ctypes.CFUNCTYPE(c_ssize_t, c_char_p, c_int, c_char_p, c_char_p) class ScintillaCallable: def __init__(self, face, scifn, sciptr): -- cgit v1.2.3