Objective-C and pass by value
Point* Sum(Point p1, Point p2)
{
Point* sol = [Point new];
[sol setX:[(&p1) x]+[(&p2) x]];
[sol setY:[(&p1) y]+[(&p2) y]];
return sol;
}
I could call this function like this:
Point* p3 = Sum( p,p2);
Is this a C backward compatibility issue, or is there any Objective-C undocumented feature.
iBook, Mac OS X (10.4.6)