* Improve TCFType macros
This adds the following new features:
* `declare_TCFType!`: Generics are accepted.
* `impl_TCFType!`: Non-defaulted generics are accepted, and impls are
fixed to be for all generics.
In addition, some warnings are silenced and the macros no longer depend
on any traits being in scope in the caller.
* Support generics in impl_CFComparison
* Add generic test for macros
This enables clippy in CI and suppresses most of the existing
warnings. We can drill down and fix those later, but this will
help start getting things under control.
Consolidate package configuration where possible. This also
removes the `homepage` key as it only points to the repository
so isn't providing anything additional.
Use workspace dependencies for the crates provided by the workspace
and used within the workspace. This centralizes the version number
maintenance a bit.
Since `CFIndex` is just `isize`, we can use the `CFIndex::MAX`
constant. The `max_value` and other functions are pending
deprecation and cause a clippy lint warning.
This removes an implicit feature due to the optional dependency
`uuid`.
While this is user visible, any use of `uuid` as a feature previously
would not have enabled the support code and so it wouldn't have had
any benefit.
`core::ffi` is the preferred way to access these type definitions.
Begin removing uses of the versions from `libc`.
`libc::c_void` is not exactly the same as `core::ffi::c_void` but
some code has tried using them interchangeably (like in io-surface).
`libc::size_t` is `usize` on all current platforms.
This reverts commit 6d00383baf.
It broke semver because it removed the export of CFIndex which
which older versions of the core-foundation crate are depending on.
Fixes#619
macOS 13 uses NSTaggedPointerString for short CFStrings
which means the retain counts aren't meaningful. Increasing the length
of the strings avoids this.
Empty arrays also seem to refer to a shared constant object that
doesn't have meaningful retain counts either.
Fixes#597
This test was failing intermittently on github actions.
There's no safe way to check that a file descriptor has been closed,
because a new file could have been reopened with the same number. We'd
then end up closing that new file instead of having close() fail.
Adds run_in_mode wrapper over CFRunLoopRunInMode
Adds a `run_in_mode` wrapper function which just makes `CFRunLoopRunInMode` a little more "rusty".
Also adds a `CFRunLoopRunResult` enum to type the return value.
Add a `name` method to `CFTimeZone` to get the time zone ID (e.g.,
"America/Los_Angeles") of the current time zone.
Core Foundation calls this "name" instead of "id" in its method
signatures, but acknowledges it in the closely-related NSTimeZone
related docs. Since most of the other methods in this library match
closely with CF naming, also use `name` here.
> Time zone database entries such as “America/Los_Angeles” are IDs, not
> names. An example of a time zone name is “Pacific Daylight Time”.
> Although many NSTimeZone symbols include the word “name”, they
> actually refer to IDs.