| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
C# uses `long`s to access many native values. With `PtrToArg<m_enum>` and
`PtrToArg<bitfield<m_enum>>` this isn't a problem, as C++ code converts
through a `*(int64_t*)` cast in assignment, so all 64-bits are initialized.
However, with `PtrToArg<char32_t>`, value assignment happens through an
`*(int *)` cast, leaving 32 bits uninitialized where `int` is 32 bits. On
platforms where `int` is 16 bits, there are presumably 48 bits uninitialized,
though there are very few platforms where this is still the case.
The easiest way to see the practical effects of this is by looking at
`EventInputKey.Unicode`:
```csharp
public override void _Input(InputEvent @event) {
if (@event is InputEventKey keyEvent) {
if (keyEvent.IsPressed() && !keyEvent.Echo) {
var raw = keyEvent.Unicode;
var value = raw & 0xffffffff;
GD.Print($"Key pressed: raw: {raw}; masked: {(char) value} ({value})");
}
}
}
```
Pressing 'a' emits the following line:
```
Key pressed: raw: -3617008645356650399; masked: a (97)
```
Examining execution flow in gdb shows this conversion going through the
following line:
```
PtrToArg<char32_t>::encode (p_ptr=0x7ffcd5bb4b18, p_val=97 U'a') at ./core/variant/binder_common.h:221
221 *(int *)p_ptr = p_val;
```
Here, `p_val` is still 97, which is the value `InputEventKey.Unicode`
is expected to have. After assignment, `p *(int64_t *)0x7ffcd5bb4b18` displays
`-3617008645356650399`, with only the lower 32 bits being properly assigned,
and is the value we see from C#.
With this patch applied, the above testing `_Input` now prints:
```
Key pressed: raw: 97; masked: a (97)
```
Thank you to blujay1269 for asking about an unexpected value they saw in
`EventInputKey.Unicode`, which prompted this investigation.
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Remove unused `initialize_ref`
|
| | |_|/
| |/| | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Adds `is_valid_unicode_identifier()`
- Adds `is_valid_ascii_identifier()`
- Deprecates `is_valid_identifier()`
- Renames `validate_identifier()` to `validate_ascii_identifier()`
|
| |/ /
|/| | |
|
| | |
| | |
| | |
| | | |
Variant type was not updated correctly causing leaks in ref-counted
|
|/ /
| |
| |
| | |
And fix a few occurrences of formatting errors that led me to this.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 150b50cfcde95f74419ade2811d963224e96fc98.
As discussed with the GDScript team, this has some implications which aren't
fully consensual yet, and which we want to revisit.
For now we revert to the 4.2 behavior for the 4.3 release, to avoid breaking
user expectations.
|
|\ \
| | |
| | |
| | | |
[Core] Fix sharing of typed arrays from constructor
|
| | | |
|
| | |
| | |
| | |
| | | |
new/changed low-level methods to GDExtension API.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
Redefine `GetSimpleTypeT<>` in terms of `<type_traits>`
|
| | | | |
|
| |/ /
|/| |
| | |
| | | |
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
|
| | |
| | |
| | |
| | |
| | | |
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
|
| | | |
|
| | |
| | |
| | |
| | | |
Convenience for a number of cases operating on single values
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
Update the description and parameter name for Vector3 reflect to correct how the plane is constructed
|
| | | |
| | | |
| | | |
| | | | |
the plane is constructed
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
[Core] Fix property access on read-only `Dictionary`
|
| | |/ /
| |/| | |
|
|\ \ \ \
| |_|/ /
|/| | |
| | | | |
Use `likely()` in `PtrToArg<T *>` when checking for null `Object *`s
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Core: Use `<type_traits>` where applicable
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
Use compatible text resource format when possible
|
| | |_|/ /
| |/| | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | |
| | | | | |
Core: Utilize initalizer lists in Variant constructors
|
| | | | | |
|
|/ / / / |
|
|/ / / |
|
|\ \ \
| | | |
| | | |
| | | | |
Save PackedByteArrays as base64 encoded
|
| | | | |
|
| | | | |
|
| |/ /
|/| | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
Core: Implement a XOR operator for BitField
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Sorts leading `_` before other characters except `.`.
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Enforce template syntax `typename` over `class`
|