-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Lua skin additions #3667
Lua skin additions #3667
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request does not contain a valid label. Please add one of the following labels: ['pr-fix', 'pr-change', 'pr-feature', 'pr-maintenance']
Assuming CI "passes" with only its regular amount of failing tests, this lgtm. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3667 +/- ##
==========================================
+ Coverage 27.65% 27.95% +0.29%
==========================================
Files 191 191
Lines 43472 43528 +56
==========================================
+ Hits 12023 12167 +144
+ Misses 31449 31361 -88 |
The regular amount of tests failed, so I'm merging this. |
Was just about to add comments in the internal We currently do a ptr comparison against Per https://stackoverflow.com/a/30223989, it's probably safer (and Swift friendly) to do something like: func isBoolNumber(num:NSNumber) -> Bool
{
let boolID = CFBooleanGetTypeID() // the type ID of CFBoolean
let numID = CFGetTypeID(num) // the type ID of num
return numID == boolID
} They give an Obj-C version as well, but I don't want to change what's currently working atm. If we have a place where we're sticking Swift related notes, let me know and I'll post this there. |
We don't have such a thing yet, but we probably should. I wonder if a Project might make sense? |
Some proposed changes to LuaSkin:
I know we're planning a move to Swift soon, but in the meantime, this pull has the following:
the
pushNSObject:
methods will now check for a more specific match (i.e.isMemberOfClass:
) and then fall back toisKindOfClass:
.the
log*:
methods will now accept varagrs in theNSString stringWithFormat:
style.[LuaSkin logError:@"%s - callback error", USERDATA_TAG]
, as opposed to the current[LuaSkin logError:[NSString stringWithFormat:@"%s - callback error", USERDATA_TAG]]