Skip to content

Commit

Permalink
Add helper for class name (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
joehoyle authored Jul 19, 2023
1 parent 3e378f8 commit 4e8bec7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/zend/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ impl ClassEntry {
Self::try_find(name.as_str().ok()?)
}
}

pub fn name(&self) -> Option<&str> {
unsafe { self.name.as_ref().and_then(|s| s.as_str().ok()) }
}
}

impl PartialEq for ClassEntry {
Expand Down

0 comments on commit 4e8bec7

Please sign in to comment.