@@ -170,7 +170,7 @@ unsafe extern "C" fn host_callback(
170
170
unimplemented ! ( )
171
171
}
172
172
173
- fn create_function_import_list ( host_functions : & [ HostFunction ] ) -> Vec < sys:: FizzyImportedFunction > {
173
+ fn create_function_import_list ( host_functions : & [ & HostFunction ] ) -> Vec < sys:: FizzyImportedFunction > {
174
174
assert ! ( host_functions. len( ) == 1 ) ;
175
175
let host_function = & host_functions[ 0 ] ;
176
176
let fn_type = sys:: FizzyFunctionType {
@@ -183,8 +183,8 @@ fn create_function_import_list(host_functions: &[HostFunction]) -> Vec<sys::Fizz
183
183
function : Some ( host_callback) ,
184
184
context : std:: ptr:: null_mut ( ) ,
185
185
} ;
186
- print ! (
187
- "{:?} {:?}" ,
186
+ println ! (
187
+ "mod: {:?} name: {:?}" ,
188
188
host_function. module. as_bytes_with_nul( ) ,
189
189
host_function. name. as_bytes_with_nul( )
190
190
) ;
@@ -208,8 +208,11 @@ impl Module {
208
208
output : sys:: FizzyValueTypeVoid ,
209
209
index : 0 ,
210
210
} ;
211
- let import_list = create_function_import_list ( & [ host_fn1] ) ;
212
- println ! ( "{:?} {}" , import_list. as_ptr( ) , import_list. len( ) ) ;
211
+ let import_list = vec ! [ & host_fn1] ;
212
+ let import_list = create_function_import_list ( & import_list) ;
213
+ println ! ( "importlist: {:?} {}" , import_list. as_ptr( ) , import_list. len( ) ) ;
214
+ println ! ( "{:?}" , host_fn1. module) ; //unsafe { std::ffi::CStr::from_ptr(import_list[0].module) });
215
+ println ! ( "{:?}" , unsafe { std:: ffi:: CStr :: from_ptr( import_list[ 0 ] . module) } ) ;
213
216
let ptr = unsafe {
214
217
sys:: fizzy_resolve_instantiate (
215
218
self . 0 ,
0 commit comments