@@ -209,7 +209,7 @@ unsafe extern "C" fn host_callback(
209209 unimplemented ! ( )
210210}
211211
212- fn create_function_import_list ( host_functions : & [ HostFunction ] ) -> Vec < sys:: FizzyImportedFunction > {
212+ fn create_function_import_list ( host_functions : & [ & HostFunction ] ) -> Vec < sys:: FizzyImportedFunction > {
213213 assert ! ( host_functions. len( ) == 1 ) ;
214214 let host_function = & host_functions[ 0 ] ;
215215 let fn_type = sys:: FizzyFunctionType {
@@ -222,8 +222,8 @@ fn create_function_import_list(host_functions: &[HostFunction]) -> Vec<sys::Fizz
222222 function : Some ( host_callback) ,
223223 context : std:: ptr:: null_mut ( ) ,
224224 } ;
225- print ! (
226- "{:?} {:?}" ,
225+ println ! (
226+ "mod: {:?} name: {:?}" ,
227227 host_function. module. as_bytes_with_nul( ) ,
228228 host_function. name. as_bytes_with_nul( )
229229 ) ;
@@ -246,8 +246,11 @@ impl Module {
246246 output : sys:: FizzyValueTypeVoid ,
247247 index : 0 ,
248248 } ;
249- let import_list = create_function_import_list ( & [ host_fn1] ) ;
250- println ! ( "{:?} {}" , import_list. as_ptr( ) , import_list. len( ) ) ;
249+ let import_list = vec ! [ & host_fn1] ;
250+ let import_list = create_function_import_list ( & import_list) ;
251+ println ! ( "importlist: {:?} {}" , import_list. as_ptr( ) , import_list. len( ) ) ;
252+ println ! ( "{:?}" , host_fn1. module) ; //unsafe { std::ffi::CStr::from_ptr(import_list[0].module) });
253+ println ! ( "{:?}" , unsafe { std:: ffi:: CStr :: from_ptr( import_list[ 0 ] . module) } ) ;
251254 let ptr = unsafe {
252255 sys:: fizzy_resolve_instantiate (
253256 self . 0 . as_ptr ( ) ,
0 commit comments