File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,16 @@ impl<'a> CSerialize<'a> for Function {
79
79
80
80
assert ! ( !signature. is_variadic( ) ) ;
81
81
82
- let name = self . name ( ) ;
82
+ // Get the function name + namespace
83
+ let name = {
84
+ let path = item. path_for_allowlisting ( ctx) . clone ( ) ;
85
+ if path. get ( 0 ) . is_some_and ( |part| part == "root" ) {
86
+ & path[ 1 ..]
87
+ } else {
88
+ & path[ ..]
89
+ }
90
+ . join ( "::" )
91
+ } ;
83
92
84
93
// Function arguments stored as `(name, type_id)` tuples.
85
94
let args = {
@@ -114,7 +123,11 @@ impl<'a> CSerialize<'a> for Function {
114
123
} ;
115
124
116
125
// The name used for the wrapper self.
117
- let wrap_name = format ! ( "{name}{}" , ctx. wrap_static_fns_suffix( ) ) ;
126
+ let wrap_name = format ! (
127
+ "{}{}" ,
128
+ item. canonical_name( ctx) ,
129
+ ctx. wrap_static_fns_suffix( )
130
+ ) ;
118
131
119
132
// The function's return type
120
133
let ( ret_item, ret_ty) = {
You can’t perform that action at this time.
0 commit comments