-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make use of latin1
encoding explicit in gdextension_interface.cpp
.
#101352
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How am I just now realizing we've never had a parsing equivalent for ascii of all things. Yeah, there's the CharString
function, but the fact we've never had a parse_ascii
or static String ascii
feels like a wild oversight.
Hah, yeah that surprised me too. I have a PR open for it: #101304 |
ff52af1
to
b8c8ed1
Compare
@@ -31,6 +31,7 @@ | |||
#ifndef SORT_EFFECTS_RD_H | |||
#define SORT_EFFECTS_RD_H | |||
|
|||
#include "servers/rendering/renderer_rd/shader_rd.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick fix due to build failing because of erroneous cache restores.
I have previously established that including a non-generated file explicitly solves such cache issues for good.
b8c8ed1
to
5b834db
Compare
5b834db
to
334e027
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Overall, this is a great idea, however, I'm a little worried about introducing subtle behavior changes. There's two spots where I think behavior may be changing, and we should discuss if this is a change we want or not.
334e027
to
329774e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in gdextension_interface.cpp
look good to me!
This is a small sanity PR with no change in behavior.
latin1
constructors and parsing functions are exposed with this PR (as isparse_utf32
with similar reasoning).Some functions in the gdextension interface advertise to parse
latin1
, but they currently parse "whatever theString
constructor uses" - which isparse_latin1
. This is correct, but imprecise.To give more context, for most
String
constructor callers, the currentparse_latin1
is incorrect, as most use it to parse utf-8 literals1. It would be sane to make the use oflatin1
explicit, to avoid confusing it with the other cases.I also took the opportunity to clean up the
memnew
calls of related functions a bit.Footnotes
https://github.com/godotengine/godot/issues/100641 ↩