nst / RuntimeBrowser

Objective-C Runtime Browser, for Mac OS X and iOS
3.57k stars 510 forks source link

Wrong behavior of sort_ios_headers_contents.py #2

Closed ole closed 11 years ago

ole commented 11 years ago

During my experiments with the sorted iOS headers in the iOS-Runtime-Headers repo (git difftool 6.0 6.1), I discovered two kinds of errors in the sorting behavior of your sort_ios_headers_contents.py tool. None of them are a big deal but I thought maybe you'd like to know. I'm certainly not requesting this to be fixed ASAP.

Example 1: Forward declarations of classes do not seem to be sorted at the moment:

forward-class-decl-1

forward-class-decl-2

Example 2: ivars are usually sorted correctly but I found one issue where it was wrong:

ivars-not-sorted

nst commented 11 years ago

Thank you for this detailed report.

You are right, the forwarded classes were not sorted. I fixed this in the script and will regenerate the headers before next week.

Regarding the ivars ordering, I believe the order is correct. In iOS 6.0, ACOAuthSigner first two ivars start with an underscore so they come first, whereas in iOS 6.1 all its ivars start with an underscore, and are correctly sorted.

ole commented 11 years ago

You're right, I missed the underscore.