Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0db34c2

Browse files
SteveNewsuve
authored andcommitted
Update ctypes.inc for Delphi-compatibility
Delphi has UIntPtr and IntPtr, not PtrUInt and PtrInt.
1 parent df433a3 commit 0db34c2

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

‎units/ctypes.inc

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,17 @@ type
161161
pointer: uintptr_t"
162162
Source: https://pubs.opengroup.org/onlinepubs/000095399/basedefs/stdint.h.html
163163
}
164-
cuintptr_t = PtrUInt;
165-
{$EXTERNALSYM cuintptr_t}
166-
cintptr_t = PtrInt;
167-
{$EXTERNALSYM cintptr_t}
164+
{$IFNDEF FPC}
165+
cuintptr_t = UIntPtr;
166+
{$EXTERNALSYM cuintptr_t}
167+
cintptr_t = IntPtr;
168+
{$EXTERNALSYM cintptr_t}
169+
{$ELSE}
170+
cuintptr_t = PtrUInt;
171+
{$EXTERNALSYM cuintptr_t}
172+
cintptr_t = PtrInt;
173+
{$EXTERNALSYM cintptr_t}
174+
{$ENDIF}
168175

169176
{$IFDEF WANT_CWCHAR_T}
170177
(* wchar_t is the "wide character" type of the C language.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /