mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
add embedding macro for checking pointer existence
needed for determining whether an interface or callback has been provided
This commit is contained in:
parent
a296b2d073
commit
52fb8562d6
1 changed files with 7 additions and 0 deletions
|
@ -4,6 +4,13 @@
|
||||||
|
|
||||||
#![macro_use]
|
#![macro_use]
|
||||||
|
|
||||||
|
|
||||||
|
macro_rules! check_ptr_exist {
|
||||||
|
($var:expr, $member:ident) => (
|
||||||
|
unsafe { (*CefWrap::to_c($var)).$member.is_some() }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Provides the implementation of a CEF class. An example follows:
|
// Provides the implementation of a CEF class. An example follows:
|
||||||
//
|
//
|
||||||
// struct ServoCefThing {
|
// struct ServoCefThing {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue