Skip to content

Commit

Permalink
Runtime structs are no longer enums.
Browse files Browse the repository at this point in the history
  • Loading branch information
SSheldon committed Feb 26, 2015
1 parent 4f28895 commit e86d26a
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions core/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,34 @@ pub struct Sel {
ptr: *const c_void,
}

/// A marker type to be embedded into other types just so that they cannot be
/// constructed externally.
#[repr(C)]
struct PrivateMarker;

/// A type that represents an instance variable.
pub enum Ivar { }
#[repr(C)]
pub struct Ivar {
_priv: PrivateMarker,
}

/// A type that represents a method in a class definition.
pub enum Method { }
#[repr(C)]
pub struct Method {
_priv: PrivateMarker,
}

/// A type that represents an Objective-C class.
pub enum Class { }
#[repr(C)]
pub struct Class {
_priv: PrivateMarker,
}

/// A type that represents an instance of a class.
pub enum Object { }
#[repr(C)]
pub struct Object {
_priv: PrivateMarker,
}

/// A pointer to the start of a method implementation.
pub type Imp = extern fn(*mut Object, Sel, ...) -> *mut Object;
Expand Down

0 comments on commit e86d26a

Please sign in to comment.