File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ use crate::pymethod::{
15
15
} ;
16
16
use crate :: utils:: { self , get_pyo3_crate, PythonDoc } ;
17
17
use crate :: PyFunctionOptions ;
18
- use proc_macro2:: { Span , TokenStream } ;
18
+ use proc_macro2:: { Literal , Span , TokenStream } ;
19
19
use quote:: { format_ident, quote} ;
20
20
use syn:: ext:: IdentExt ;
21
21
use syn:: parse:: { Parse , ParseStream } ;
@@ -1006,13 +1006,15 @@ fn generate_class_info(
1006
1006
let class_field_info = format_ident ! ( "{}_struct_field_info" , ident_prefix) ;
1007
1007
let class_info = format_ident ! ( "{}_struct_info" , ident_prefix) ;
1008
1008
1009
+ let name = Literal :: string ( & * get_class_python_name ( cls, args) . to_string ( ) ) ;
1010
+
1009
1011
quote ! {
1010
1012
const #class_field_info: [ pyo3:: interface:: FieldInfo ; 0 ] = [
1011
1013
//TODO
1012
1014
] ;
1013
1015
1014
1016
const #class_info: pyo3:: interface:: ClassInfo = pyo3:: interface:: ClassInfo {
1015
- name: "" , //TODO
1017
+ name: #name ,
1016
1018
base: "" , //TODO
1017
1019
fields: & #class_field_info,
1018
1020
} ;
You can’t perform that action at this time.
0 commit comments