[pulse] Init struct fields with zero when a message is sent to nil
Summary:
By D26664187 (e4ff4b500a
), it returns nil when a message is sent to nil.
On the other hand, when the return type is a struct type, the semantics should be different: it should return a struct with all fields are initialized with nil.
According to
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithObjects/WorkingwithObjects.html#//apple_ref/doc/uid/TP40011210-CH4-SW28
> Note: If you expect a return value from a message sent to nil, the return value will be nil for object return types, 0 for numeric types, and NO for BOOL types. Returned structures have all members initialized to zero.
Reviewed By: jvillard
Differential Revision: D27289996
fbshipit-source-id: 1ddd9b088