@@ -17,14 +17,6 @@ macro_rules! decode_pure {
1717 } ;
1818}
1919
20- macro_rules! decode_env_ref {
21- ( $path: path) => {
22- InputFn :: new( |input: & syn:: Ident | -> TokenStream {
23- quote! { $path( & env, & #input) ? }
24- } )
25- } ;
26- }
27-
2820macro_rules! decode_env_ref_mut {
2921 ( $path: path) => {
3022 InputFn :: new( |input: & syn:: Ident | -> TokenStream {
@@ -33,20 +25,6 @@ macro_rules! decode_env_ref_mut {
3325 } ;
3426}
3527
36- macro_rules! decode_option_env_ref {
37- ( $path: path) => {
38- InputFn :: new( |input: & syn:: Ident | -> TokenStream {
39- quote! {
40- if !#input. is_null( ) {
41- Some ( $path( & env, & #input) ?)
42- } else {
43- None
44- }
45- }
46- } )
47- } ;
48- }
49-
5028macro_rules! decode_option_env_ref_mut {
5129 ( $path: path) => {
5230 InputFn :: new( |input: & syn:: Ident | -> TokenStream {
@@ -161,19 +139,7 @@ macro_rules! encode_cast {
161139/// bindings — into the methods phase and the Kotlin generator.
162140fn shared_bindings ( ) -> TypeRegistry {
163141 primitive_builtins ( )
164- // Strings & byte arrays (String converters now in primitive_builtins)
165- . type_pair (
166- "Vec<u8>" ,
167- "jni::objects::JByteArray" ,
168- decode_env_ref ! ( crate :: utils:: decode_byte_array) ,
169- NO_OUTPUT ,
170- )
171- . type_pair (
172- "Option<Vec<u8>>" ,
173- "jni::objects::JByteArray" ,
174- decode_option_env_ref ! ( crate :: utils:: decode_byte_array) ,
175- NO_OUTPUT ,
176- )
142+ // String and byte-array converters are in primitive_builtins.
177143 // Callbacks.
178144 . type_pair (
179145 "impl Fn(Sample) + Send + Sync + 'static" ,
0 commit comments