parmanoir/jscocoa — pull request #5 by mugginsoft (2012-04-27 11:12:43+00:00)
Title: Skip Obj-C type qualifiers when parsing method encoding

The following code raises:

JSException: jsCocoaObject_callAsFunction could not parse type encodings @20@0:4@8I12o^@16

var theArray = ["hello", "bye"]

log("PList Format is " + NSPropertyListXMLFormat_v1_0)

var formatValid = [NSPropertyListSerialization propertyList:theArray isValidForFormat:NSPropertyListXMLFormat_v1_0]
log("format is valid = " + formatValid)

var thePlistNSData = NSPropertyListSerialization.dataFromPropertyList_format_errorDescription(theArray, NSPropertyListXMLFormat_v1_0, nil)

log([[NSString alloc] initWithData:thePlistNSData encoding:NSUTF8StringEncoding])

Obj-C qualifiers do not affect the argument size and can be skipped.
This commit hopefully fixes the issue.