This is a backport from 4.0 to 3.x that adds 'sort' and 'has' methods
to the following types:
- PoolByteArray
- PoolIntArray
- PoolRealArray
- PoolStringArray
- PoolVector2Array
- PoolVector3Array
- PoolColorArray
For all the types above, the methods 'sort' and 'has' have been
exposed to the GDNative API (v. 1.3)
Since the method 'has' was already implemented in GDScript before,
in this commit it has been only exposed to GDNative API.
The classes documentation is updated.
The method 'sort' uses the exisging class "Sorter".
Pooled arrays in 4.0 are rewritten, that's why this backport is not
completely indentical to the original PR made for 4.0 (see #32144).
The define is **not used by godot**, but in GDNative libraries.
I'm not sure it should be defined there in the first place, though we
shouldn't change that (for compatibility).
This commit changes the platform detection order to detect mingw
compiling for windows (which defines `__GNUC__`).
This commit also wraps the definition around a guard to let libraries
override it with a build-time define.
Backports features and bugfixes from current Godot 4.0 to 3.5 and brings functions and codebase of both version largely in sync to make tutorials more compatible and future backports easier.
The class PoolStringArray in GDScript has `join` method, and it even has documentation.
However, the corresponding definition of this method in GDNative headers were missing.
In this commit, the missing GDNative definition of `join` method has been added.
A new CORE API version 1.3 has been added with the new metod `join`.
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.
Each class XML's schema conformance is also checked on GitHub Actions.
Using codespell 2.2-dev from current git.
Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
(cherry picked from commit 1bdb82c64e)
Return a const String reference to make sure that when its address
is used as a handle in NativeScriptLanguage::init_library(),
it refers to the heap instead of a temporary object on the stack.
For the time being we don't support writing a description for those, preferring
having all details in the method's description.
Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
(cherry picked from commit 7adf4cc9b5)