summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/mono/mono_gd/gd_mono_method.cpp12
-rw-r--r--modules/websocket/SCsub7
2 files changed, 12 insertions, 7 deletions
diff --git a/modules/mono/mono_gd/gd_mono_method.cpp b/modules/mono/mono_gd/gd_mono_method.cpp
index 69040a3df8..ad52904945 100644
--- a/modules/mono/mono_gd/gd_mono_method.cpp
+++ b/modules/mono/mono_gd/gd_mono_method.cpp
@@ -230,12 +230,14 @@ String GDMonoMethod::get_signature_desc(bool p_namespaces) const {
}
void GDMonoMethod::get_parameter_names(Vector<StringName> &names) const {
- const char *_names = memnew_arr(char, params_count);
- mono_method_get_param_names(mono_method, &_names);
- for (int i = 0; i < params_count; ++i) {
- names.push_back(StringName(&_names[i]));
+ if (params_count > 0) {
+ const char **_names = memnew_arr(const char *, params_count);
+ mono_method_get_param_names(mono_method, _names);
+ for (int i = 0; i < params_count; ++i) {
+ names.push_back(StringName(_names[i]));
+ }
+ memdelete_arr(_names);
}
- memdelete_arr(_names);
}
void GDMonoMethod::get_parameter_types(Vector<ManagedType> &types) const {
diff --git a/modules/websocket/SCsub b/modules/websocket/SCsub
index 3b0f920bbf..1a36e05863 100644
--- a/modules/websocket/SCsub
+++ b/modules/websocket/SCsub
@@ -54,7 +54,7 @@ thirdparty_sources = [
if env_lws["platform"] == "android": # Builtin getifaddrs
thirdparty_sources += ["misc/getifaddrs.c"]
-if env_lws["platform"] == "windows": # Winsock
+if env_lws["platform"] == "windows" or env_lws["platform"] == "uwp": # Winsock
thirdparty_sources += ["plat/lws-plat-win.c", helper_dir + "getopt.c", helper_dir + "getopt_long.c", helper_dir + "gettimeofday.c"]
else: # Unix socket
thirdparty_sources += ["plat/lws-plat-unix.c"]
@@ -75,7 +75,10 @@ else:
mbedtls_includes = "#thirdparty/mbedtls/include"
env_lws.Append(CPPPATH=[mbedtls_includes])
- if env_lws["platform"] == "windows":
+ if env_lws["platform"] == "windows" or env_lws["platform"] == "uwp":
env_lws.Append(CPPPATH=[thirdparty_dir + helper_dir])
+ if env_lws["platform"] == "uwp":
+ env_lws.Append(CCFLAGS=["/DLWS_MINGW_SUPPORT"])
+
env_lws.add_source_files(env.modules_sources, "*.cpp")