working for nonnull(not yet)

This commit is contained in:
neuecc 2023-09-04 20:57:50 +09:00
parent 4ed2767538
commit 7041ca7f48
2 changed files with 13 additions and 6 deletions

View File

@ -178,13 +178,17 @@ pub extern "C" fn test_func_issue_39(_f: extern "C" fn(i32)){
pub extern "C" fn test_func_issue_39_variation1(_f: extern "C" fn(i32, i32, i32)){ pub extern "C" fn test_func_issue_39_variation1(_f: extern "C" fn(i32, i32, i32)){
} }
#[no_mangle] // #[no_mangle]
pub extern "C" fn nonnull_parameter(_output_word_uuid: NonNull<[u8; 16]>){ // pub extern "C" fn nonnull_parameter(_output_word_uuid: NonNull<[u8; 16]>){
} // }
#[no_mangle] // #[no_mangle]
pub extern "C" fn non_nonnull_parameter(_output_word_uuid: [u8; 16]){ // pub extern "C" fn non_nonnull_parameter(_output_word_uuid: [u8; 16]){
} // }
// #[no_mangle]
// pub extern "C" fn non_nonnull_parameter2(_output_word_uuid: NonNull<u8>){
// }
#[no_mangle] #[no_mangle]
pub extern "C" fn ge(_f: extern "C" fn(i32, i32, i32)){ pub extern "C" fn ge(_f: extern "C" fn(i32, i32, i32)){

View File

@ -58,6 +58,9 @@ namespace CsBindgen
[DllImport(__DllName, EntryPoint = "non_nonnull_parameter", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport(__DllName, EntryPoint = "non_nonnull_parameter", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void non_nonnull_parameter(void/* byte[] */ _output_word_uuid); public static extern void non_nonnull_parameter(void/* byte[] */ _output_word_uuid);
[DllImport(__DllName, EntryPoint = "non_nonnull_parameter2", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void non_nonnull_parameter2(byte _output_word_uuid);
[DllImport(__DllName, EntryPoint = "ge", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [DllImport(__DllName, EntryPoint = "ge", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void ge(delegate* unmanaged[Cdecl]<int, int, int, void> _f); public static extern void ge(delegate* unmanaged[Cdecl]<int, int, int, void> _f);