Commit graph

8 commits

Author SHA1 Message Date
George Marques 029fd88adb
Fix VariantInternal initialization and setting of object
- Initialize Object pointer to nullptr so it's not used by mistake.
- When setting an Object check if it's a reference so refcounting works
  as intended.
2020-11-30 14:49:52 -03:00
Rémi Verschelde 4ed42bfc29
Merge pull request #43725 from vnen/gdscript-typed-vm-2
GDScript: Typed VM Take 2
2020-11-23 09:59:20 +01:00
George Marques 15b085e8db
Add extra functions to VariantInternal
- Allow getting an opaque pointer, no matter the type (for ptrcall).
- Allow setting object pointer and id directly.
- Allow initializing the data given a type, to allow properly setting
  return types on ptrcalls.
2020-11-21 13:24:49 -03:00
George Marques 8a9e3524a9
Fix variant getters not setting return type
The validated getters were only setting the value without changing the
type, leading to wrong results. This uses the same path used for
methods to the same purpose.
2020-11-20 15:55:17 -03:00
reduz 9979abce74 Change how no-arg constructor is handled internally in Variant. 2020-11-09 16:28:15 -03:00
Rémi Verschelde 9d2e8f2f27
Variant: Rename Type::_RID to Type::RID
The underscore prefix was used to avoid the conflict between the `RID` class
name and the matching enum value in `Variant::Type`.

This can be fixed differently by prefixing uses of the `RID` class in `Variant`
with the scope resolution operator, as done already for `AABB`.
2020-11-09 16:29:04 +01:00
reduz 221a2a1742 Refactored variant constructor logic 2020-11-09 08:54:43 -03:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Renamed from core/variant_internal.h (Browse further)