Allow attributes in macro invocations
Allows #[cfg] to be used to make certain definitions conditional. Such as for library version feature flags.
Needed for https://github.com/Smithay/wayland-rs/pull/735 so it can have a feature flag for the libwayland version.
Seems to work, but still needs to be added to dlib-test, with CI to test with and without the feature.
Added some testing improvements. I see some issues trying to test statics: and varargs: (https://github.com/elinorbgr/dlib/issues/23, https://github.com/elinorbgr/dlib/issues/24), but I think the changes here are good, and aren't causing issues that don't already exist.
I don't think those block this from being merged and released. Though a semver breaking version of the crate will probably be needed at some point to fix those.
Just to confirm, have you tested that this changes actually makes it possible to add a feature flag to https://github.com/Smithay/wayland-rs/pull/735 ?
Yes. Simply adding #[cfg(feature = "libwayland_1_22")] appears to work as expected in wayland-sys if it uses this version of dlib.