Skip to content

Conversation

suve
Copy link
Contributor

@suve suve commented Aug 16, 2025

This PR adds some symbols missing from SDL_stdinc.inc. There's still a lot more to go, but I'd prefer to avoid having a single giant PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this great extension of the file. All seven comments relate to the same "problem" discussed in the first of them. Let me know what you think or update if you agree please.

Apart from this minor thing, this is ready to merge.

function SDL_GetNumAllocations(): cint; cdecl;
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetNumAllocations' {$ENDIF} {$ENDIF};

(* -- Environment variables manipulation functions -- *)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is not in the original code. See comment above.

@@ -153,6 +153,1121 @@ const
const
SDL_FLT_EPSILON = cfloat(1.1920928955078125e-07);

(* -- Memory management functions -- *)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is not in the original code.

I see why you added these explanatory separator comment(s). I wonder if we should extend it (them) by a small comment to indicate that these separators are added by our project and not found in the original code. I actually tried to search for this exact line in the original code to find the place to start reviewing when I noticed it is not found in the original code :).

Maybe something like:
(* - - SEPARATOR - - (line added by SDL3-for-Pascal) *)

function SDL_unsetenv_unsafe(const name: PAnsiChar): cint; cdecl;
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_unsetenv_unsafe' {$ENDIF} {$ENDIF};

(* -- Character classification functions -- *)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is not in the original code. See comment above.

function SDL_isgraph(x: cint): cint; cdecl;
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_isgraph' {$ENDIF} {$ENDIF};

(* -- Character manipulation functions -- *)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is not in the original code. See comment above.

function SDL_tolower(x: cint): cint; cdecl;
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_tolower' {$ENDIF} {$ENDIF};

(* -- Hash functions -- *)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is not in the original code. See comment above.

function SDL_murmur3_32(const data: Pointer; len: csize_t; seed: cuint32): cuint32;
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_murmur3_32' {$ENDIF} {$ENDIF};

(* -- PRNG functions -- *)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is not in the original code. See comment above.

function SDL_rand_bits_r(state: pcuint64): cuint32; cdecl;
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_rand_bits_r' {$ENDIF} {$ENDIF};

(* -- Floating-point arithmetic functions -- *)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is not in the original code. See comment above.

@suve
Copy link
Contributor Author

suve commented Aug 18, 2025

Personally I don't see much value in marking the separators as not present in the original source, though on the other hand, I'm also not adamant about keeping them. Edit to your liking and I'll adapt any follow-up PRs accordingly.

@Free-Pascal-meets-SDL-Website
Copy link
Contributor

I'd prefer them marked in some way, but it is no high priority, I guess. So let's go with them as present. :)

@Free-Pascal-meets-SDL-Website Free-Pascal-meets-SDL-Website merged commit c129396 into PascalGameDevelopment:main Aug 18, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants