eDistantObject icon indicating copy to clipboard operation
eDistantObject copied to clipboard

Don't prevent passing NULL to non-Objective-C pointer parameters.

Open copybara-service[bot] opened this issue 4 years ago • 0 comments

Don't prevent passing NULL to non-Objective-C pointer parameters.

The purpose for disallowing non-Objective-C pointer parameters is because there's no way to know how big a C pointer's underlying data is. But if the pointer is NULL, then there's nothing to pass, so just pass NULL and don't throw an exception. This opens up partial support for key-value observing and other APIs that take optional context pointers (so long as the caller doesn't provide one).

copybara-service[bot] avatar Aug 04 '21 21:08 copybara-service[bot]