8000 Convert CfpPtr to use the same style of opaque struct we use everywhe… · kddnewton/ruby@b84a3d1 · GitHub
[go: up one dir, main page]

Skip to content

Commit b84a3d1

Browse files
authored
Convert CfpPtr to use the same style of opaque struct we use everywhere else (including for EcPtr) (ruby#189)
1 parent 3b70e0d commit b84a3d1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

yjit/src/cruby.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,15 @@ pub struct rb_callable_method_entry_t {
282282
core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
283283
}
284284

285-
/// Pointer to a control frame pointer (CFP)
286-
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
287285
#[repr(C)]
288-
pub struct CfpPtr(pub usize);
286+
pub struct rb_control_frame_struct {
287+
_data: [u8; 0],
288+
_marker:
289+
core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
290+
}
291+
292+
/// Pointer to a control frame pointer (CFP)
293+
pub type CfpPtr = *mut rb_control_frame_struct;
289294

290295
impl VALUE {
291296
// Return whether the value is truthy or falsy in Ruby -- only nil and false are falsy.

0 commit comments

Comments
 (0)
0