aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2016-11-16 11:46:00 +1100
committerNeil <nyamatongwe@gmail.com>2016-11-16 11:46:00 +1100
commit0bbf9c011cb5c3d309e3f71c6283a3b5e50b9903 (patch)
treeff528b90f60eae4bab831e9aa08ce61ff57b8f1a
parent89ad0b00f23ea3bfa5da86fbab994dab075370da (diff)
downloadscintilla-mirror-0bbf9c011cb5c3d309e3f71c6283a3b5e50b9903.tar.gz
Change definition of uptr_t and sptr_t to use standardised types and headers
instead of Win32 API types and basetsd.h when on Windows.
-rw-r--r--include/Scintilla.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/include/Scintilla.h b/include/Scintilla.h
index c0f810cc1..57373c24d 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -11,8 +11,6 @@
#ifndef SCINTILLA_H
#define SCINTILLA_H
-#include "Sci_Position.h"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -28,20 +26,21 @@ int Scintilla_LinkLexers(void);
}
#endif
-/* Here should be placed typedefs for uptr_t, an unsigned integer type large enough to
- * hold a pointer and sptr_t, a signed integer large enough to hold a pointer.
- * May need to be changed for 64 bit platforms. */
-#if defined(_WIN32)
-#include <basetsd.h>
-#endif
-#ifdef MAXULONG_PTR
-typedef ULONG_PTR uptr_t;
-typedef LONG_PTR sptr_t;
+// Include header that defines basic numeric types.
+#if defined(_MSC_VER)
+// Older releases of MSVC did not have stdint.h.
+#include <stddef.h>
#else
-typedef unsigned long uptr_t;
-typedef long sptr_t;
+#include <stdint.h>
#endif
+// Define uptr_t, an unsigned integer type large enough to hold a pointer.
+typedef uintptr_t uptr_t;
+// Define sptr_t, a signed integer large enough to hold a pointer.
+typedef intptr_t sptr_t;
+
+#include "Sci_Position.h"
+
typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
/* ++Autogenerated -- start of section automatically generated from Scintilla.iface */