add embedding macro for checking pointer existence

needed for determining whether an interface or callback has been provided
This commit is contained in:
Mike Blumenkrantz 2015-05-13 18:54:19 -04:00
parent a296b2d073
commit 52fb8562d6

View file

@ -4,6 +4,13 @@
#![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:
//
// struct ServoCefThing {