ptrcall is now also used to optimize calls in GDScript, on top of the existing
use by the GDNative and Mono modules.
It no longer makes sense to make it optional.
- 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.
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.
Copied relevant documentation from the original `@GDScript` built-ins,
which will likely be removed in a future commit.
Various fixups to `variant_utility.cpp` while working on this.
* Using C-style function pointers now, InternalMethod is gone.
* This ensures much better performance in typed code.
* Renamed builtin_funcs to utility_funcs, to avoid naming confusion
-Moved Expression to use this, removed its own.
-Eventually GDScript/VisualScript/GDNative need to be moved to this.
-Given the JSON functions were hacked-in, removed them and created a new JSONParser class
-Made sure these functions appear properly in documentation, since they will be removed from GDScript
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`.