Movatterモバイル変換


[0]ホーム

URL:


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

SDL_UCS4ToUTF8 may exist from SDL_keyboard.c#3349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
MyreMylar merged 2 commits intopygame:mainfrompmp-p:patch-3
Aug 1, 2022

Conversation

@pmp-p
Copy link
Contributor

test CI for removing function

Copy link
Contributor

@ankith26ankith26 left a comment

Choose a reason for hiding this comment

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

Another alternative is to just use thepg_ prefix for this, and not rely on SDL at all on WASM (since this is an internal SDL util function, might not be wise to do)

@pmp-p
Copy link
ContributorAuthor

i think using the internal may gain some space ( .wasm are not compressed unlike .data) it's worth the risk and easy to fix later since function code will stay just above.

ankith26 reacted with thumbs up emoji

@Starbuck5
Copy link
Contributor

What about using#ifndef to define the function on our end only if it hasn't already been defined?

@ankith26
Copy link
Contributor

That would not work becauseSDL_UCS4ToUTF8 is a function name not a macro

Starbuck5 reacted with thumbs up emoji

Copy link
Contributor

@ankith26ankith26 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks 😎

This has no affect on our non-static builds, but if this makes things better for WASM lets merge this in

Copy link
Contributor

@MyreMylarMyreMylar left a comment

Choose a reason for hiding this comment

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

LGTM 👍

#else
/* Taken from SDL_iconv() */
char*
SDL_UCS4ToUTF8(Uint32ch,char*dst)
Copy link
Member

@illumeillumeAug 20, 2022
edited
Loading

Choose a reason for hiding this comment

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

ps. We should never define our own "SDL_" functions. This has bitten us in the past. Instead we should create pg_XXX functions which inside may call the SDL_XXX function, or include the function body. This way if someone links something with the SDL_XXX function in the future we have no problems.

Created an issue for this here:#3417

Copy link
Member

@illumeillume left a comment

Choose a reason for hiding this comment

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

👍

@illumeillume added bug keypygame.key labelsAug 20, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@illumeillumeillume left review comments

+2 more reviewers

@MyreMylarMyreMylarMyreMylar approved these changes

@ankith26ankith26ankith26 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

2.1.3

Development

Successfully merging this pull request may close these issues.

5 participants

@pmp-p@Starbuck5@ankith26@illume@MyreMylar

[8]ページ先頭

©2009-2025 Movatter.jp