@@ -27,7 +27,7 @@ pub struct {name}MethodTable {{
27
27
) ?;
28
28
29
29
for method in & class. methods {
30
- let method_name = method. get_name ( ) ;
30
+ let MethodName { rust_name : method_name, .. } = method. get_name ( ) ;
31
31
if method_name == "free" {
32
32
continue ;
33
33
}
@@ -49,14 +49,14 @@ impl {name}MethodTable {{
49
49
name = class. name
50
50
) ?;
51
51
for method in & class. methods {
52
- let method_name = method. get_name ( ) ;
52
+ let MethodName { rust_name : method_name, .. } = method. get_name ( ) ;
53
53
if method_name == "free" {
54
54
continue ;
55
55
}
56
56
writeln ! (
57
57
output,
58
58
" {}: 0 as *mut sys::godot_method_bind," ,
59
- method . get_name ( )
59
+ method_name ,
60
60
) ?;
61
61
}
62
62
let lookup_name: String = if has_underscore {
@@ -97,14 +97,15 @@ impl {name}MethodTable {{
97
97
lookup_name = lookup_name,
98
98
) ?;
99
99
for method in & class. methods {
100
- let method_name = method. get_name ( ) ;
100
+ let MethodName { rust_name : method_name, original_name } = method. get_name ( ) ;
101
101
if method_name == "free" {
102
102
continue ;
103
103
}
104
104
105
105
writeln ! ( output,
106
- r#" table.{method_name} = (gd_api.godot_method_bind_get_method)(class_name, "{method_name}\0".as_ptr() as *const c_char );"# ,
107
- method_name = method_name
106
+ r#" table.{method_name} = (gd_api.godot_method_bind_get_method)(class_name, "{original_name}\0".as_ptr() as *const c_char );"# ,
107
+ method_name = method_name,
108
+ original_name = original_name,
108
109
) ?;
109
110
}
110
111
@@ -124,7 +125,7 @@ pub fn generate_method_impl(
124
125
class : & GodotClass ,
125
126
method : & GodotMethod ,
126
127
) -> GeneratorResult {
127
- let method_name = method. get_name ( ) ;
128
+ let MethodName { rust_name : method_name, .. } = method. get_name ( ) ;
128
129
129
130
if skip_method ( & method_name) {
130
131
return Ok ( ( ) ) ;
@@ -259,7 +260,7 @@ pub fn generate_methods(
259
260
) -> GeneratorResult {
260
261
if let Some ( class) = api. find_class ( class_name) {
261
262
' method: for method in & class. methods {
262
- let method_name = method. get_name ( ) ;
263
+ let MethodName { rust_name : method_name, .. } = method. get_name ( ) ;
263
264
264
265
if skip_method ( & method_name) {
265
266
continue ;
0 commit comments