- Case: NSMethodSignature does not support unions
- Case: NSMethodSignature passes incompete pointer types to NSGetSizeAndAlignment which throws an exception
FLEXTypeEncodingParser worked as originally intended, but getting it working helped me realize something else: NSMethodSignature will pass structure member pointer types to NSGetSizeAndAlignment and catch any exceptions it throws.
So now FLEXTypeEncoding must parse and "clean" unsupported pointer types in method signatures to avoid those exceptions, where previously we didn't care about opinter types at all.
+[FLEXTypeEncoding methodTypeEncodingSupported:] becomes +[FLEXTypeEncoding methodTypeEncodingSupported:cleaned:] where `cleaned` is an NSString out param which stores the "cleaned" method signature (or the input signature if nothing needed cleaning). This is then passed to NSMethodSignature.
This commit also fixes a few other bugs, like arithmetic errors on when calculating the size of "v" and union size calculation.