Commit graph

253 commits

Author SHA1 Message Date
Hein-Pieter van Braam
0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Thomas Herzog
95d9302248
Merge pull request #20370 from marcelofg55/gdnative_crash
Fix possible crash at NativeScript::get_base_script
2018-07-25 17:09:51 +02:00
Marcelo Fernandez
77f3c0b495 Fix possible crash at NativeScript::get_base_script 2018-07-25 10:58:15 -03:00
Wilson E. Alvarez
a22e746bc3 Removed unnecessary assignments 2018-07-24 09:51:03 +02:00
George Marques
03746da73f
Add editor highlight for type-safe lines
The line number is hightlighted to indicate that the line contains only
type-safe code.
2018-07-20 21:55:18 -03:00
Marcelo Fernandez
deebeb2742 Add a new notification to detect crashes on native scripts 2018-07-02 16:18:58 -03:00
Thomas Herzog
22dac831bc
Merge pull request #19757 from Faless/gdnet_pr
Network bindings for GDNative
2018-06-29 19:32:22 +02:00
Fabio Alessandrelli
15451479e5 Add [Packet/Stream/Multiplayer]PeerGDNative
They provide an interface to implement PacketPeer, StreamPeer, and
NetworkedMultiplayerPeer via GDNative.
2018-06-27 19:07:30 +02:00
Rhody Lugo
920224a535 add NoCache wrapper to Command 2018-06-21 03:00:33 -04:00
Bastiaan Olij
1697cbb4bb Add access for GDNative modules to some platform dependent internals on Android 2018-06-19 17:49:23 +10:00
Emmanuel Leblond
380b85a32f
[Pluginscript] Fix not working exports in editor 2018-06-15 23:11:20 +02:00
Rémi Verschelde
3334209a73 SCons: Pass env to modules can_build method
This allows to disable modules based on the environment,
in particular `env[tools]` which tells us if we are
building the editor or not.
2018-05-30 19:11:36 +02:00
Rémi Verschelde
fc7f931d26
Merge pull request #19255 from Faless/rpc_sync_mmore
RPCMode refactor, more sync modes (2)
2018-05-30 14:59:08 +02:00
Fabio Alessandrelli
8e35d937a9 New sync keywords in GDScript, NativeScript, Mono 2018-05-29 20:26:41 +02:00
Fabio Alessandrelli
1400f6fdc4 Refactor RPCMode enum and checks 2018-05-29 20:26:41 +02:00
Max Hilbrunner
4c69a495c9
Revert "RPCMode refactor, more sync modes" 2018-05-29 11:47:52 +02:00
Bastiaan Olij
8901b3cf00 [WIP] Adding version info to GDNative ARVR interfaces 2018-05-27 20:31:41 +10:00
Fabio Alessandrelli
a5e8a3be5e New sync keywords in GDScript, NativeScript, Mono 2018-05-26 10:49:33 +02:00
Fabio Alessandrelli
9de4ffde61 Refactor RPCMode enum and checks 2018-05-26 10:43:43 +02:00
karroffel
70866bbafd changed GDNative API json format 2018-05-10 22:03:06 +02:00
Pedro J. Estébanez
474eda9e30 Fix Variant leak in call_native 2018-05-08 21:27:33 +02:00
Hein-Pieter van Braam
cee5117d3b Fix lto builds on clang compilers
The --no-lto option only works on GCC compilers. This breaks LTO builds
on MacOS and iPhone when building the gdnative wrappers.

-fno-lto works on both brands of compilers.
2018-04-30 12:59:08 +02:00
Rémi Verschelde
df79cc86a5
Merge pull request #18119 from sheepandshepherd/nativescript_property_list
Fix NativeScript property list order
2018-04-19 21:37:46 +02:00
Pedro J. Estébanez
00e98458ba Revert "Unify http- and percent- encode/decode"
This reverts commit b76ee30917.
2018-04-12 21:12:34 +02:00
sheepandshepherd
bc110b3771 Fix NativeScript property list 2018-04-11 09:43:07 +02:00
Rémi Verschelde
cb7fe2c793 doc: Sync classref with current source 2018-04-10 10:12:42 +02:00
Juan Linietsky
cd7e9d9642
Merge pull request #17583 from RandomShaper/enhance-uri-utils
Enhance uri utils
2018-04-07 17:07:29 -03:00
Emmanuel Leblond
adecd6f66f
Correct profiling_frame naming in pluginscript 2018-04-07 00:11:26 +02:00
Emmanuel Leblond
e97336a557
Fix Pluginscript add_global_constant mandatory value check 2018-04-06 19:20:12 +02:00
karroffel
2e1f239fe6 [NativeScript] replace error macros by simple returns 2018-04-06 01:40:26 +02:00
Thomas Herzog
eaa5dfbdbd
Merge pull request #17980 from karroffel/nativescript-1.1-global-type-tags
[NativeScript] added global type tag system
2018-04-05 15:09:35 +02:00
karroffel
ad93d3e277 [NativeScript] added global type tag system 2018-04-05 00:06:33 +02:00
karroffel
f29139f3cf [GDNative] enable saving GDNativeLibrary as sub resource 2018-04-04 13:07:43 +02:00
karroffel
57c0339d9f [GDNative] easier GDNativeLib handling 2018-04-04 12:24:10 +02:00
karroffel
0b92aded23 [GDNative] fixed issue with library unloading order 2018-03-31 01:45:18 +02:00
karroffel
ce36ecda4c [GDNative] added GDCALLINGCONV to instance binding functions 2018-03-31 01:44:50 +02:00
Pedro J. Estébanez
b76ee30917 Unify http- and percent- encode/decode
There was a percent-prefixed version, which was exposed, and a http-prefixed version which was not (only to GDNative).
This commit keeps the percent-prefixed versions, but with the http-prefixed implementations.
2018-03-27 19:18:30 +02:00
Rémi Verschelde
08cadc3d87 NativeScript: Fix initialization in wrong scope
Regression from d702d7b335 which broke javascript build.
2018-03-02 02:07:37 +01:00
Hein-Pieter van Braam
d702d7b335 Fix various valgrind reported uninitialized variable uses 2018-02-28 21:55:13 +01:00
Rémi Verschelde
3fa77b3172 doc: Remove status from hardcoded version string
It has no practical use case and just generates noise for each alpha, beta, etc.
2018-02-27 13:40:49 +01:00
luz.paz
612ab4bbc6 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
Rémi Verschelde
3c7a39b40c doc: Update version string in header 2018-02-19 10:46:33 +01:00
tilpner
a75a7e594e
gdnative_api.json: Change argument name to r_dest
This reflects its usage as an output argument,
consistent with the other godot_variant_new functions
2018-02-11 17:19:17 +01:00
Thomas Herzog
31dd21a8d9
Merge pull request #16539 from eska014/gdnative-macwarn
Fix GDNATIVE_API_INIT() warning about sign mismatch
2018-02-10 17:36:57 +01:00
Leon Krause
8e39cdd5d5 Fix GDNATIVE_API_INIT() warning about sign mismatch 2018-02-10 17:19:16 +01:00
karroffel
0b2afa24b8 add initial NativeScript 1.1 extension
This commit adds new functionality to NativeScript, namely:

 - ability to set and get documentation for classes, methods,
   signals and properties

 - ability to set names and type information to method arguments

 - ability to set and get type tags for nativescripts

 - ability to register instance binding data management functions

 - ability to use instance binding data
2018-02-09 15:04:41 +01:00
karroffel
2fb66df669 generate proper API structs for GDNative extension extensions
The GDNative C API gets passed to libraries in a struct of function
pointers. To provide stable binary compatibility, each extension not
part of the core API is separated into its own sub-struct.

These structs aren't meant to be changed in order to keep binary
compatibility.

In case of an API extension, the structs include a `next` pointer
which can point to a new struct with additional function pointers.

Godot's build system generates the API structs automatically at
build time, but so far there has no support for the mentioned `next`
pointers.

This commit changes the API struct generation in such a way that code
that used previous headers will compile without problem with the new
headers.

The new extension-extensions (weird name, but that's what it is) get
generated recursively and include the version in the struct-name.
2018-02-09 11:44:54 +01:00
Paolo Perkovic
08d4bfacaf Fix inconsistencies and typos in argument names 2018-02-01 16:47:20 +01:00
Rémi Verschelde
d516aab8fa doc: Sync with current source
Also enhance RigidBody docs as per https://github.com/godotengine/godot-docs/pull/1018
and fix the version tag in all files (not really stable yet, but it makes no sense
to hardcode rc3 at this stage).
2018-01-25 08:50:56 +01:00
Rémi Verschelde
9f479f096c Fix typos in code and docs with codespell
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-18 22:01:42 +01:00