diff options
| author | Kostadin Damyanov | 2015-08-09 12:45:21 +0300 |
|---|---|---|
| committer | Kostadin Damyanov | 2015-08-09 12:45:21 +0300 |
| commit | cdf1ac7d58f3dc026cd316a66450771762d74432 (patch) | |
| tree | 635ab608220b2940674098253efddbca7a69377a /modules/gdscript/gd_script.cpp | |
| parent | f5bfd497aab7e24a6f4dc0315e9e9333504067a0 (diff) | |
| parent | c2e2f2e0aebf6342e6f18ae5d67b6a825590675a (diff) | |
| download | godot-cdf1ac7d58f3dc026cd316a66450771762d74432.tar.gz godot-cdf1ac7d58f3dc026cd316a66450771762d74432.tar.zst godot-cdf1ac7d58f3dc026cd316a66450771762d74432.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'modules/gdscript/gd_script.cpp')
| -rw-r--r-- | modules/gdscript/gd_script.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index b6ad7aa71..53ae0c870 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -1977,9 +1977,17 @@ void GDScript::_bind_methods() { ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"new",&GDScript::_new,MethodInfo("new")); + ObjectTypeDB::bind_method(_MD("get_as_byte_code"),&GDScript::get_as_byte_code); + } +Vector<uint8_t> GDScript::get_as_byte_code() const { + + GDTokenizerBuffer tokenizer; + return tokenizer.parse_code_string(source); +}; + Error GDScript::load_byte_code(const String& p_path) { @@ -2556,9 +2564,9 @@ void GDScriptLanguage::init() { //populate native classes - List<String> class_list; + List<StringName> class_list; ObjectTypeDB::get_type_list(&class_list); - for(List<String>::Element *E=class_list.front();E;E=E->next()) { + for(List<StringName>::Element *E=class_list.front();E;E=E->next()) { StringName n = E->get(); String s = String(n); |
