summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/gdscript.cpp2
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp2
-rw-r--r--modules/gdscript/gdscript_compiler.cpp2
-rw-r--r--modules/mono/class_db_api_json.cpp2
-rw-r--r--modules/mono/editor/bindings_generator.cpp12
-rw-r--r--modules/mono/editor/bindings_generator.h4
6 files changed, 13 insertions, 11 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 64258ee8d3..617db883f8 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -62,7 +62,7 @@ GDScriptNativeClass::GDScriptNativeClass(const StringName &p_name) {
bool GDScriptNativeClass::_get(const StringName &p_name, Variant &r_ret) const {
bool ok;
- int v = ClassDB::get_integer_constant(name, p_name, &ok);
+ int64_t v = ClassDB::get_integer_constant(name, p_name, &ok);
if (ok) {
r_ret = v;
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index a070d319f3..42b02ce3b9 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -2900,7 +2900,7 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
return;
}
bool valid = false;
- int int_constant = ClassDB::get_integer_constant(native, name, &valid);
+ int64_t int_constant = ClassDB::get_integer_constant(native, name, &valid);
if (valid) {
p_identifier->is_constant = true;
p_identifier->reduced_value = int_constant;
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index b2cce9d8ee..25454030b1 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -312,7 +312,7 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
// Class C++ integer constant.
if (nc) {
bool success = false;
- int constant = ClassDB::get_integer_constant(nc->get_name(), identifier, &success);
+ int64_t constant = ClassDB::get_integer_constant(nc->get_name(), identifier, &success);
if (success) {
return codegen.add_constant(constant);
}
diff --git a/modules/mono/class_db_api_json.cpp b/modules/mono/class_db_api_json.cpp
index 3afde1e8d3..c4547b4323 100644
--- a/modules/mono/class_db_api_json.cpp
+++ b/modules/mono/class_db_api_json.cpp
@@ -124,7 +124,7 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) {
List<StringName> snames;
- for (const KeyValue<StringName, int> &F : t->constant_map) {
+ for (const KeyValue<StringName, int64_t> &F : t->constant_map) {
snames.push_back(F.key);
}
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 960d2fe27c..9d3d481068 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -954,7 +954,7 @@ void BindingsGenerator::_generate_global_constants(StringBuilder &p_output) {
}
}
- p_output.append(MEMBER_BEGIN "public const int ");
+ p_output.append(MEMBER_BEGIN "public const long ");
p_output.append(iconstant.proxy_name);
p_output.append(" = ");
p_output.append(itos(iconstant.value));
@@ -992,6 +992,7 @@ void BindingsGenerator::_generate_global_constants(StringBuilder &p_output) {
p_output.append("\n" INDENT1 "public enum ");
p_output.append(enum_proxy_name);
+ p_output.append(" : long");
p_output.append("\n" INDENT1 OPEN_BLOCK);
const ConstantInterface &last = ienum.constants.back()->get();
@@ -1417,7 +1418,7 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
}
}
- output.append(MEMBER_BEGIN "public const int ");
+ output.append(MEMBER_BEGIN "public const long ");
output.append(iconstant.proxy_name);
output.append(" = ");
output.append(itos(iconstant.value));
@@ -1435,6 +1436,7 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
output.append(MEMBER_BEGIN "public enum ");
output.append(ienum.cname.operator String());
+ output.append(" : long");
output.append(MEMBER_BEGIN OPEN_BLOCK);
const ConstantInterface &last = ienum.constants.back()->get();
@@ -3088,7 +3090,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
const List<StringName> &enum_constants = E.value;
for (const StringName &constant_cname : enum_constants) {
String constant_name = constant_cname.operator String();
- int *value = class_info->constant_map.getptr(constant_cname);
+ int64_t *value = class_info->constant_map.getptr(constant_cname);
ERR_FAIL_NULL_V(value, false);
constants.erase(constant_name);
@@ -3123,7 +3125,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
}
for (const String &constant_name : constants) {
- int *value = class_info->constant_map.getptr(StringName(constant_name));
+ int64_t *value = class_info->constant_map.getptr(StringName(constant_name));
ERR_FAIL_NULL_V(value, false);
ConstantInterface iconstant(constant_name, snake_to_pascal_case(constant_name, true), *value);
@@ -3666,7 +3668,7 @@ void BindingsGenerator::_populate_global_constants() {
}
}
- int constant_value = CoreConstants::get_global_constant_value(i);
+ int64_t constant_value = CoreConstants::get_global_constant_value(i);
StringName enum_name = CoreConstants::get_global_constant_enum(i);
ConstantInterface iconstant(constant_name, snake_to_pascal_case(constant_name, true), constant_value);
diff --git a/modules/mono/editor/bindings_generator.h b/modules/mono/editor/bindings_generator.h
index f0ba2b18e4..70c4f12146 100644
--- a/modules/mono/editor/bindings_generator.h
+++ b/modules/mono/editor/bindings_generator.h
@@ -45,12 +45,12 @@ class BindingsGenerator {
struct ConstantInterface {
String name;
String proxy_name;
- int value = 0;
+ int64_t value = 0;
const DocData::ConstantDoc *const_doc;
ConstantInterface() {}
- ConstantInterface(const String &p_name, const String &p_proxy_name, int p_value) {
+ ConstantInterface(const String &p_name, const String &p_proxy_name, int64_t p_value) {
name = p_name;
proxy_name = p_proxy_name;
value = p_value;