diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-01-06 11:12:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-06 11:12:20 +0100 |
commit | b59b1690cfb1dbe82ba9da24b865306700f4a11b (patch) | |
tree | bfed80d57becad420143b359437f99425c0d24f3 | |
parent | af78302988681478f7daeb98c03257ba283dbb45 (diff) | |
parent | fe67c713189199b8e8b457a348416100f5414085 (diff) |
Merge pull request #1207 from glyn/license-compatibility
Fix license incompatibility
-rw-r--r-- | tests/expectations/tests/issue-816.rs | 465 | ||||
-rw-r--r-- | tests/headers/issue-816.h | 84 |
2 files changed, 254 insertions, 295 deletions
diff --git a/tests/expectations/tests/issue-816.rs b/tests/expectations/tests/issue-816.rs index bb8a323a..555769a2 100644 --- a/tests/expectations/tests/issue-816.rs +++ b/tests/expectations/tests/issue-816.rs @@ -1,9 +1,7 @@ /* automatically generated by rust-bindgen */ - #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] - #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit<Storage, Align> @@ -85,476 +83,470 @@ where } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] -pub struct jvmtiCapabilities { +pub struct capabilities { pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize], u8>, pub __bindgen_align: [u32; 0usize], } #[test] -fn bindgen_test_layout_jvmtiCapabilities() { +fn bindgen_test_layout_capabilities() { assert_eq!( - ::std::mem::size_of::<jvmtiCapabilities>(), + ::std::mem::size_of::<capabilities>(), 16usize, - concat!("Size of: ", stringify!(jvmtiCapabilities)) + concat!("Size of: ", stringify!(capabilities)) ); assert_eq!( - ::std::mem::align_of::<jvmtiCapabilities>(), + ::std::mem::align_of::<capabilities>(), 4usize, - concat!("Alignment of ", stringify!(jvmtiCapabilities)) + concat!("Alignment of ", stringify!(capabilities)) ); } -impl jvmtiCapabilities { +impl capabilities { #[inline] - pub fn can_tag_objects(&self) -> ::std::os::raw::c_uint { + pub fn bit_1(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } } #[inline] - pub fn set_can_tag_objects(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_1(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_field_modification_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_2(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_field_modification_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_2(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_field_access_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_3(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_field_access_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_3(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] - pub fn can_get_bytecodes(&self) -> ::std::os::raw::c_uint { + pub fn bit_4(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } #[inline] - pub fn set_can_get_bytecodes(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_4(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] - pub fn can_get_synthetic_attribute(&self) -> ::std::os::raw::c_uint { + pub fn bit_5(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } #[inline] - pub fn set_can_get_synthetic_attribute(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_5(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] - pub fn can_get_owned_monitor_info(&self) -> ::std::os::raw::c_uint { + pub fn bit_6(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } #[inline] - pub fn set_can_get_owned_monitor_info(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_6(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] - pub fn can_get_current_contended_monitor(&self) -> ::std::os::raw::c_uint { + pub fn bit_7(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } #[inline] - pub fn set_can_get_current_contended_monitor(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_7(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] - pub fn can_get_monitor_info(&self) -> ::std::os::raw::c_uint { + pub fn bit_8(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } } #[inline] - pub fn set_can_get_monitor_info(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_8(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(7usize, 1u8, val as u64) } } #[inline] - pub fn can_pop_frame(&self) -> ::std::os::raw::c_uint { + pub fn bit_9(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } } #[inline] - pub fn set_can_pop_frame(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_9(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] - pub fn can_redefine_classes(&self) -> ::std::os::raw::c_uint { + pub fn bit_10(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } } #[inline] - pub fn set_can_redefine_classes(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_10(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] - pub fn can_signal_thread(&self) -> ::std::os::raw::c_uint { + pub fn bit_11(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } } #[inline] - pub fn set_can_signal_thread(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_11(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] - pub fn can_get_source_file_name(&self) -> ::std::os::raw::c_uint { + pub fn bit_12(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } } #[inline] - pub fn set_can_get_source_file_name(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_12(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] - pub fn can_get_line_numbers(&self) -> ::std::os::raw::c_uint { + pub fn bit_13(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } } #[inline] - pub fn set_can_get_line_numbers(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_13(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] - pub fn can_get_source_debug_extension(&self) -> ::std::os::raw::c_uint { + pub fn bit_14(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } } #[inline] - pub fn set_can_get_source_debug_extension(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_14(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] - pub fn can_access_local_variables(&self) -> ::std::os::raw::c_uint { + pub fn bit_15(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } } #[inline] - pub fn set_can_access_local_variables(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_15(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] - pub fn can_maintain_original_method_order(&self) -> ::std::os::raw::c_uint { + pub fn bit_16(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } } #[inline] - pub fn set_can_maintain_original_method_order(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_16(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_single_step_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_17(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_single_step_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_17(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(16usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_exception_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_18(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_exception_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_18(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(17usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_frame_pop_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_19(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_frame_pop_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_19(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(18usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_breakpoint_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_20(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_breakpoint_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_20(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(19usize, 1u8, val as u64) } } #[inline] - pub fn can_suspend(&self) -> ::std::os::raw::c_uint { + pub fn bit_21(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } } #[inline] - pub fn set_can_suspend(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_21(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(20usize, 1u8, val as u64) } } #[inline] - pub fn can_redefine_any_class(&self) -> ::std::os::raw::c_uint { + pub fn bit_22(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } } #[inline] - pub fn set_can_redefine_any_class(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_22(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(21usize, 1u8, val as u64) } } #[inline] - pub fn can_get_current_thread_cpu_time(&self) -> ::std::os::raw::c_uint { + pub fn bit_23(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u32) } } #[inline] - pub fn set_can_get_current_thread_cpu_time(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_23(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(22usize, 1u8, val as u64) } } #[inline] - pub fn can_get_thread_cpu_time(&self) -> ::std::os::raw::c_uint { + pub fn bit_24(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u32) } } #[inline] - pub fn set_can_get_thread_cpu_time(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_24(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(23usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_method_entry_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_25(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_method_entry_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_25(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(24usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_method_exit_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_26(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_method_exit_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_26(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(25usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_all_class_hook_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_27(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_all_class_hook_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_27(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(26usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_compiled_method_load_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_28(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_compiled_method_load_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_28(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(27usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_monitor_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_29(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_monitor_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_29(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(28usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_vm_object_alloc_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_30(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_vm_object_alloc_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_30(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(29usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_native_method_bind_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_31(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_native_method_bind_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_31(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(30usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_garbage_collection_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_32(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_garbage_collection_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_32(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(31usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_object_free_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_33(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_object_free_events(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_33(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(32usize, 1u8, val as u64) } } #[inline] - pub fn can_force_early_return(&self) -> ::std::os::raw::c_uint { + pub fn bit_34(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u32) } } #[inline] - pub fn set_can_force_early_return(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_34(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(33usize, 1u8, val as u64) } } #[inline] - pub fn can_get_owned_monitor_stack_depth_info(&self) -> ::std::os::raw::c_uint { + pub fn bit_35(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u32) } } #[inline] - pub fn set_can_get_owned_monitor_stack_depth_info(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_35(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(34usize, 1u8, val as u64) } } #[inline] - pub fn can_get_constant_pool(&self) -> ::std::os::raw::c_uint { + pub fn bit_36(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u32) } } #[inline] - pub fn set_can_get_constant_pool(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_36(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(35usize, 1u8, val as u64) } } #[inline] - pub fn can_set_native_method_prefix(&self) -> ::std::os::raw::c_uint { + pub fn bit_37(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u32) } } #[inline] - pub fn set_can_set_native_method_prefix(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_37(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(36usize, 1u8, val as u64) } } #[inline] - pub fn can_retransform_classes(&self) -> ::std::os::raw::c_uint { + pub fn bit_38(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u32) } } #[inline] - pub fn set_can_retransform_classes(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_38(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(37usize, 1u8, val as u64) } } #[inline] - pub fn can_retransform_any_class(&self) -> ::std::os::raw::c_uint { + pub fn bit_39(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 1u8) as u32) } } #[inline] - pub fn set_can_retransform_any_class(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_bit_39(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(38usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_resource_exhaustion_heap_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_40(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(39usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_resource_exhaustion_heap_events( - &mut self, - val: ::std::os::raw::c_uint, - ) { + pub fn set_bit_40(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(39usize, 1u8, val as u64) } } #[inline] - pub fn can_generate_resource_exhaustion_threads_events(&self) -> ::std::os::raw::c_uint { + pub fn bit_41(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 1u8) as u32) } } #[inline] - pub fn set_can_generate_resource_exhaustion_threads_events( - &mut self, - val: ::std::os::raw::c_uint, - ) { + pub fn set_bit_41(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(40usize, 1u8, val as u64) @@ -562,246 +554,213 @@ impl jvmtiCapabilities { } #[inline] pub fn new_bitfield_1( - can_tag_objects: ::std::os::raw::c_uint, - can_generate_field_modification_events: ::std::os::raw::c_uint, - can_generate_field_access_events: ::std::os::raw::c_uint, - can_get_bytecodes: ::std::os::raw::c_uint, - can_get_synthetic_attribute: ::std::os::raw::c_uint, - can_get_owned_monitor_info: ::std::os::raw::c_uint, - can_get_current_contended_monitor: ::std::os::raw::c_uint, - can_get_monitor_info: ::std::os::raw::c_uint, - can_pop_frame: ::std::os::raw::c_uint, - can_redefine_classes: ::std::os::raw::c_uint, - can_signal_thread: ::std::os::raw::c_uint, - can_get_source_file_name: ::std::os::raw::c_uint, - can_get_line_numbers: ::std::os::raw::c_uint, - can_get_source_debug_extension: ::std::os::raw::c_uint, - can_access_local_variables: ::std::os::raw::c_uint, - can_maintain_original_method_order: ::std::os::raw::c_uint, - can_generate_single_step_events: ::std::os::raw::c_uint, - can_generate_exception_events: ::std::os::raw::c_uint, - can_generate_frame_pop_events: ::std::os::raw::c_uint, - can_generate_breakpoint_events: ::std::os::raw::c_uint, - can_suspend: ::std::os::raw::c_uint, - can_redefine_any_class: ::std::os::raw::c_uint, - can_get_current_thread_cpu_time: ::std::os::raw::c_uint, - can_get_thread_cpu_time: ::std::os::raw::c_uint, - can_generate_method_entry_events: ::std::os::raw::c_uint, - can_generate_method_exit_events: ::std::os::raw::c_uint, - can_generate_all_class_hook_events: ::std::os::raw::c_uint, - can_generate_compiled_method_load_events: ::std::os::raw::c_uint, - can_generate_monitor_events: ::std::os::raw::c_uint, - can_generate_vm_object_alloc_events: ::std::os::raw::c_uint, - can_generate_native_method_bind_events: ::std::os::raw::c_uint, - can_generate_garbage_collection_events: ::std::os::raw::c_uint, - can_generate_object_free_events: ::std::os::raw::c_uint, - can_force_early_return: ::std::os::raw::c_uint, - can_get_owned_monitor_stack_depth_info: ::std::os::raw::c_uint, - can_get_constant_pool: ::std::os::raw::c_uint, - can_set_native_method_prefix: ::std::os::raw::c_uint, - can_retransform_classes: ::std::os::raw::c_uint, - can_retransform_any_class: ::std::os::raw::c_uint, - can_generate_resource_exhaustion_heap_events: ::std::os::raw::c_uint, - can_generate_resource_exhaustion_threads_events: ::std::os::raw::c_uint, + bit_1: ::std::os::raw::c_uint, + bit_2: ::std::os::raw::c_uint, + bit_3: ::std::os::raw::c_uint, + bit_4: ::std::os::raw::c_uint, + bit_5: ::std::os::raw::c_uint, + bit_6: ::std::os::raw::c_uint, + bit_7: ::std::os::raw::c_uint, + bit_8: ::std::os::raw::c_uint, + bit_9: ::std::os::raw::c_uint, + bit_10: ::std::os::raw::c_uint, + bit_11: ::std::os::raw::c_uint, + bit_12: ::std::os::raw::c_uint, + bit_13: ::std::os::raw::c_uint, + bit_14: ::std::os::raw::c_uint, + bit_15: ::std::os::raw::c_uint, + bit_16: ::std::os::raw::c_uint, + bit_17: ::std::os::raw::c_uint, + bit_18: ::std::os::raw::c_uint, + bit_19: ::std::os::raw::c_uint, + bit_20: ::std::os::raw::c_uint, + bit_21: ::std::os::raw::c_uint, + bit_22: ::std::os::raw::c_uint, + bit_23: ::std::os::raw::c_uint, + bit_24: ::std::os::raw::c_uint, + bit_25: ::std::os::raw::c_uint, + bit_26: ::std::os::raw::c_uint, + bit_27: ::std::os::raw::c_uint, + bit_28: ::std::os::raw::c_uint, + bit_29: ::std::os::raw::c_uint, + bit_30: ::std::os::raw::c_uint, + bit_31: ::std::os::raw::c_uint, + bit_32: ::std::os::raw::c_uint, + bit_33: ::std::os::raw::c_uint, + bit_34: ::std::os::raw::c_uint, + bit_35: ::std::os::raw::c_uint, + bit_36: ::std::os::raw::c_uint, + bit_37: ::std::os::raw::c_uint, + bit_38: ::std::os::raw::c_uint, + bit_39: ::std::os::raw::c_uint, + bit_40: ::std::os::raw::c_uint, + bit_41: ::std::os::raw::c_uint, ) -> __BindgenBitfieldUnit<[u8; 16usize], u8> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 16usize], u8> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { - let can_tag_objects: u32 = unsafe { ::std::mem::transmute(can_tag_objects) }; - can_tag_objects as u64 + let bit_1: u32 = unsafe { ::std::mem::transmute(bit_1) }; + bit_1 as u64 }); __bindgen_bitfield_unit.set(1usize, 1u8, { - let can_generate_field_modification_events: u32 = - unsafe { ::std::mem::transmute(can_generate_field_modification_events) }; - can_generate_field_modification_events as u64 + let bit_2: u32 = unsafe { ::std::mem::transmute(bit_2) }; + bit_2 as u64 }); __bindgen_bitfield_unit.set(2usize, 1u8, { - let can_generate_field_access_events: u32 = - unsafe { ::std::mem::transmute(can_generate_field_access_events) }; - can_generate_field_access_events as u64 + let bit_3: u32 = unsafe { ::std::mem::transmute(bit_3) }; + bit_3 as u64 }); __bindgen_bitfield_unit.set(3usize, 1u8, { - let can_get_bytecodes: u32 = unsafe { ::std::mem::transmute(can_get_bytecodes) }; - can_get_bytecodes as u64 + let bit_4: u32 = unsafe { ::std::mem::transmute(bit_4) }; + bit_4 as u64 }); __bindgen_bitfield_unit.set(4usize, 1u8, { - let can_get_synthetic_attribute: u32 = - unsafe { ::std::mem::transmute(can_get_synthetic_attribute) }; - can_get_synthetic_attribute as u64 + let bit_5: u32 = unsafe { ::std::mem::transmute(bit_5) }; + bit_5 as u64 }); __bindgen_bitfield_unit.set(5usize, 1u8, { - let can_get_owned_monitor_info: u32 = - unsafe { ::std::mem::transmute(can_get_owned_monitor_info) }; - can_get_owned_monitor_info as u64 + let bit_6: u32 = unsafe { ::std::mem::transmute(bit_6) }; + bit_6 as u64 }); __bindgen_bitfield_unit.set(6usize, 1u8, { - let can_get_current_contended_monitor: u32 = - unsafe { ::std::mem::transmute(can_get_current_contended_monitor) }; - can_get_current_contended_monitor as u64 + let bit_7: u32 = unsafe { ::std::mem::transmute(bit_7) }; + bit_7 as u64 }); __bindgen_bitfield_unit.set(7usize, 1u8, { - let can_get_monitor_info: u32 = unsafe { ::std::mem::transmute(can_get_monitor_info) }; - can_get_monitor_info as u64 + let bit_8: u32 = unsafe { ::std::mem::transmute(bit_8) }; + bit_8 as u64 }); __bindgen_bitfield_unit.set(8usize, 1u8, { - let can_pop_frame: u32 = unsafe { ::std::mem::transmute(can_pop_frame) }; - can_pop_frame as u64 + let bit_9: u32 = unsafe { ::std::mem::transmute(bit_9) }; + bit_9 as u64 }); __bindgen_bitfield_unit.set(9usize, 1u8, { - let can_redefine_classes: u32 = unsafe { ::std::mem::transmute(can_redefine_classes) }; - can_redefine_classes as u64 + let bit_10: u32 = unsafe { ::std::mem::transmute(bit_10) }; + bit_10 as u64 }); __bindgen_bitfield_unit.set(10usize, 1u8, { - let can_signal_thread: u32 = unsafe { ::std::mem::transmute(can_signal_thread) }; - can_signal_thread as u64 + let bit_11: u32 = unsafe { ::std::mem::transmute(bit_11) }; + bit_11 as u64 }); __bindgen_bitfield_unit.set(11usize, 1u8, { - let can_get_source_file_name: u32 = - unsafe { ::std::mem::transmute(can_get_source_file_name) }; - can_get_source_file_name as u64 + let bit_12: u32 = unsafe { ::std::mem::transmute(bit_12) }; + bit_12 as u64 }); __bindgen_bitfield_unit.set(12usize, 1u8, { - let can_get_line_numbers: u32 = unsafe { ::std::mem::transmute(can_get_line_numbers) }; - can_get_line_numbers as u64 + let bit_13: u32 = unsafe { ::std::mem::transmute(bit_13) }; + bit_13 as u64 }); __bindgen_bitfield_unit.set(13usize, 1u8, { - let can_get_source_debug_extension: u32 = - unsafe { ::std::mem::transmute(can_get_source_debug_extension) }; - can_get_source_debug_extension as u64 + let bit_14: u32 = unsafe { ::std::mem::transmute(bit_14) }; + bit_14 as u64 }); __bindgen_bitfield_unit.set(14usize, 1u8, { - let can_access_local_variables: u32 = - unsafe { ::std::mem::transmute(can_access_local_variables) }; - can_access_local_variables as u64 + let bit_15: u32 = unsafe { ::std::mem::transmute(bit_15) }; + bit_15 as u64 }); __bindgen_bitfield_unit.set(15usize, 1u8, { - let can_maintain_original_method_order: u32 = - unsafe { ::std::mem::transmute(can_maintain_original_method_order) }; - can_maintain_original_method_order as u64 + let bit_16: u32 = unsafe { ::std::mem::transmute(bit_16) }; + bit_16 as u64 }); __bindgen_bitfield_unit.set(16usize, 1u8, { - let can_generate_single_step_events: u32 = - unsafe { ::std::mem::transmute(can_generate_single_step_events) }; - can_generate_single_step_events as u64 + let bit_17: u32 = unsafe { ::std::mem::transmute(bit_17) }; + bit_17 as u64 }); __bindgen_bitfield_unit.set(17usize, 1u8, { - let can_generate_exception_events: u32 = - unsafe { ::std::mem::transmute(can_generate_exception_events) }; - can_generate_exception_events as u64 + let bit_18: u32 = unsafe { ::std::mem::transmute(bit_18) }; + bit_18 as u64 }); __bindgen_bitfield_unit.set(18usize, 1u8, { - let can_generate_frame_pop_events: u32 = - unsafe { ::std::mem::transmute(can_generate_frame_pop_events) }; - can_generate_frame_pop_events as u64 + let bit_19: u32 = unsafe { ::std::mem::transmute(bit_19) }; + bit_19 as u64 }); __bindgen_bitfield_unit.set(19usize, 1u8, { - let can_generate_breakpoint_events: u32 = - unsafe { ::std::mem::transmute(can_generate_breakpoint_events) }; - can_generate_breakpoint_events as u64 + let bit_20: u32 = unsafe { ::std::mem::transmute(bit_20) }; + bit_20 as u64 }); __bindgen_bitfield_unit.set(20usize, 1u8, { - let can_suspend: u32 = unsafe { ::std::mem::transmute(can_suspend) }; - can_suspend as u64 + let bit_21: u32 = unsafe { ::std::mem::transmute(bit_21) }; + bit_21 as u64 }); __bindgen_bitfield_unit.set(21usize, 1u8, { - let can_redefine_any_class: u32 = - unsafe { ::std::mem::transmute(can_redefine_any_class) }; - can_redefine_any_class as u64 + let bit_22: u32 = unsafe { ::std::mem::transmute(bit_22) }; + bit_22 as u64 }); __bindgen_bitfield_unit.set(22usize, 1u8, { - let can_get_current_thread_cpu_time: u32 = - unsafe { ::std::mem::transmute(can_get_current_thread_cpu_time) }; - can_get_current_thread_cpu_time as u64 + let bit_23: u32 = unsafe { ::std::mem::transmute(bit_23) }; + bit_23 as u64 }); __bindgen_bitfield_unit.set(23usize, 1u8, { - let can_get_thread_cpu_time: u32 = - unsafe { ::std::mem::transmute(can_get_thread_cpu_time) }; - can_get_thread_cpu_time as u64 + let bit_24: u32 = unsafe { ::std::mem::transmute(bit_24) }; + bit_24 as u64 }); __bindgen_bitfield_unit.set(24usize, 1u8, { - let can_generate_method_entry_events: u32 = - unsafe { ::std::mem::transmute(can_generate_method_entry_events) }; - can_generate_method_entry_events as u64 + let bit_25: u32 = unsafe { ::std::mem::transmute(bit_25) }; + bit_25 as u64 }); __bindgen_bitfield_unit.set(25usize, 1u8, { - let can_generate_method_exit_events: u32 = - unsafe { ::std::mem::transmute(can_generate_method_exit_events) }; - can_generate_method_exit_events as u64 + let bit_26: u32 = unsafe { ::std::mem::transmute(bit_26) }; + bit_26 as u64 }); __bindgen_bitfield_unit.set(26usize, 1u8, { - let can_generate_all_class_hook_events: u32 = - unsafe { ::std::mem::transmute(can_generate_all_class_hook_events) }; - can_generate_all_class_hook_events as u64 + let bit_27: u32 = unsafe { ::std::mem::transmute(bit_27) }; + bit_27 as u64 }); __bindgen_bitfield_unit.set(27usize, 1u8, { - let can_generate_compiled_method_load_events: u32 = - unsafe { ::std::mem::transmute(can_generate_compiled_method_load_events) }; - can_generate_compiled_method_load_events as u64 + let bit_28: u32 = unsafe { ::std::mem::transmute(bit_28) }; + bit_28 as u64 }); __bindgen_bitfield_unit.set(28usize, 1u8, { - let can_generate_monitor_events: u32 = - unsafe { ::std::mem::transmute(can_generate_monitor_events) }; - can_generate_monitor_events as u64 + let bit_29: u32 = unsafe { ::std::mem::transmute(bit_29) }; + bit_29 as u64 }); __bindgen_bitfield_unit.set(29usize, 1u8, { - let can_generate_vm_object_alloc_events: u32 = - unsafe { ::std::mem::transmute(can_generate_vm_object_alloc_events) }; - can_generate_vm_object_alloc_events as u64 + let bit_30: u32 = unsafe { ::std::mem::transmute(bit_30) }; + bit_30 as u64 }); __bindgen_bitfield_unit.set(30usize, 1u8, { - let can_generate_native_method_bind_events: u32 = - unsafe { ::std::mem::transmute(can_generate_native_method_bind_events) }; - can_generate_native_method_bind_events as u64 + let bit_31: u32 = unsafe { ::std::mem::transmute(bit_31) }; + bit_31 as u64 }); __bindgen_bitfield_unit.set(31usize, 1u8, { - let can_generate_garbage_collection_events: u32 = - unsafe { ::std::mem::transmute(can_generate_garbage_collection_events) }; - can_generate_garbage_collection_events as u64 + let bit_32: u32 = unsafe { ::std::mem::transmute(bit_32) }; + bit_32 as u64 }); __bindgen_bitfield_unit.set(32usize, 1u8, { - let can_generate_object_free_events: u32 = - unsafe { ::std::mem::transmute(can_generate_object_free_events) }; - can_generate_object_free_events as u64 + let bit_33: u32 = unsafe { ::std::mem::transmute(bit_33) }; + bit_33 as u64 }); __bindgen_bitfield_unit.set(33usize, 1u8, { - let can_force_early_return: u32 = - unsafe { ::std::mem::transmute(can_force_early_return) }; - can_force_early_return as u64 + let bit_34: u32 = unsafe { ::std::mem::transmute(bit_34) }; + bit_34 as u64 }); __bindgen_bitfield_unit.set(34usize, 1u8, { - let can_get_owned_monitor_stack_depth_info: u32 = - unsafe { ::std::mem::transmute(can_get_owned_monitor_stack_depth_info) }; - can_get_owned_monitor_stack_depth_info as u64 + let bit_35: u32 = unsafe { ::std::mem::transmute(bit_35) }; + bit_35 as u64 }); __bindgen_bitfield_unit.set(35usize, 1u8, { - let can_get_constant_pool: u32 = - unsafe { ::std::mem::transmute(can_get_constant_pool) }; - can_get_constant_pool as u64 + let bit_36: u32 = unsafe { ::std::mem::transmute(bit_36) }; + bit_36 as u64 }); __bindgen_bitfield_unit.set(36usize, 1u8, { - let can_set_native_method_prefix: u32 = - unsafe { ::std::mem::transmute(can_set_native_method_prefix) }; - can_set_native_method_prefix as u64 + let bit_37: u32 = unsafe { ::std::mem::transmute(bit_37) }; + bit_37 as u64 }); __bindgen_bitfield_unit.set(37usize, 1u8, { - let can_retransform_classes: u32 = - unsafe { ::std::mem::transmute(can_retransform_classes) }; - can_retransform_classes as u64 + let bit_38: u32 = unsafe { ::std::mem::transmute(bit_38) }; + bit_38 as u64 }); __bindgen_bitfield_unit.set(38usize, 1u8, { - let can_retransform_any_class: u32 = - unsafe { ::std::mem::transmute(can_retransform_any_class) }; - can_retransform_any_class as u64 + let bit_39: u32 = unsafe { ::std::mem::transmute(bit_39) }; + bit_39 as u64 }); __bindgen_bitfield_unit.set(39usize, 1u8, { - let can_generate_resource_exhaustion_heap_events: u32 = - unsafe { ::std::mem::transmute(can_generate_resource_exhaustion_heap_events) }; - can_generate_resource_exhaustion_heap_events as u64 + let bit_40: u32 = unsafe { ::std::mem::transmute(bit_40) }; + bit_40 as u64 }); __bindgen_bitfield_unit.set(40usize, 1u8, { - let can_generate_resource_exhaustion_threads_events: u32 = - unsafe { ::std::mem::transmute(can_generate_resource_exhaustion_threads_events) }; - can_generate_resource_exhaustion_threads_events as u64 + let bit_41: u32 = unsafe { ::std::mem::transmute(bit_41) }; + bit_41 as u64 }); __bindgen_bitfield_unit } diff --git a/tests/headers/issue-816.h b/tests/headers/issue-816.h index cacb0260..5f16a178 100644 --- a/tests/headers/issue-816.h +++ b/tests/headers/issue-816.h @@ -1,49 +1,49 @@ typedef struct { - unsigned int can_tag_objects : 1; - unsigned int can_generate_field_modification_events : 1; - unsigned int can_generate_field_access_events : 1; - unsigned int can_get_bytecodes : 1; - unsigned int can_get_synthetic_attribute : 1; - unsigned int can_get_owned_monitor_info : 1; - unsigned int can_get_current_contended_monitor : 1; - unsigned int can_get_monitor_info : 1; - unsigned int can_pop_frame : 1; - unsigned int can_redefine_classes : 1; - unsigned int can_signal_thread : 1; - unsigned int can_get_source_file_name : 1; - unsigned int can_get_line_numbers : 1; - unsigned int can_get_source_debug_extension : 1; - unsigned int can_access_local_variables : 1; - unsigned int can_maintain_original_method_order : 1; - unsigned int can_generate_single_step_events : 1; - unsigned int can_generate_exception_events : 1; - unsigned int can_generate_frame_pop_events : 1; - unsigned int can_generate_breakpoint_events : 1; - unsigned int can_suspend : 1; - unsigned int can_redefine_any_class : 1; - unsigned int can_get_current_thread_cpu_time : 1; - unsigned int can_get_thread_cpu_time : 1; - unsigned int can_generate_method_entry_events : 1; - unsigned int can_generate_method_exit_events : 1; - unsigned int can_generate_all_class_hook_events : 1; - unsigned int can_generate_compiled_method_load_events : 1; - unsigned int can_generate_monitor_events : 1; - unsigned int can_generate_vm_object_alloc_events : 1; - unsigned int can_generate_native_method_bind_events : 1; - unsigned int can_generate_garbage_collection_events : 1; - unsigned int can_generate_object_free_events : 1; - unsigned int can_force_early_return : 1; - unsigned int can_get_owned_monitor_stack_depth_info : 1; - unsigned int can_get_constant_pool : 1; - unsigned int can_set_native_method_prefix : 1; - unsigned int can_retransform_classes : 1; - unsigned int can_retransform_any_class : 1; - unsigned int can_generate_resource_exhaustion_heap_events : 1; - unsigned int can_generate_resource_exhaustion_threads_events : 1; + unsigned int bit_1 : 1; + unsigned int bit_2 : 1; + unsigned int bit_3 : 1; + unsigned int bit_4 : 1; + unsigned int bit_5 : 1; + unsigned int bit_6 : 1; + unsigned int bit_7 : 1; + unsigned int bit_8 : 1; + unsigned int bit_9 : 1; + unsigned int bit_10 : 1; + unsigned int bit_11 : 1; + unsigned int bit_12 : 1; + unsigned int bit_13 : 1; + unsigned int bit_14 : 1; + unsigned int bit_15 : 1; + unsigned int bit_16 : 1; + unsigned int bit_17 : 1; + unsigned int bit_18 : 1; + unsigned int bit_19 : 1; + unsigned int bit_20 : 1; + unsigned int bit_21 : 1; + unsigned int bit_22 : 1; + unsigned int bit_23 : 1; + unsigned int bit_24 : 1; + unsigned int bit_25 : 1; + unsigned int bit_26 : 1; + unsigned int bit_27 : 1; + unsigned int bit_28 : 1; + unsigned int bit_29 : 1; + unsigned int bit_30 : 1; + unsigned int bit_31 : 1; + unsigned int bit_32 : 1; + unsigned int bit_33 : 1; + unsigned int bit_34 : 1; + unsigned int bit_35 : 1; + unsigned int bit_36 : 1; + unsigned int bit_37 : 1; + unsigned int bit_38 : 1; + unsigned int bit_39 : 1; + unsigned int bit_40 : 1; + unsigned int bit_41 : 1; unsigned int : 7; unsigned int : 16; unsigned int : 16; unsigned int : 16; unsigned int : 16; unsigned int : 16; -} jvmtiCapabilities; +} capabilities; |