bugGNUstep - Bugs: bug #37575, Incorrect return type for...


You are not allowed to post comments on this tracker with your current authentication level.

bug #37575: Incorrect return type for NSCharacterSet methods

Submitted by:  Thomas Davie <beelsebob>
Submitted on:  Mon 15 Oct 2012 10:04:15 AM UTC  
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Tue 16 Oct 2012 07:13:24 AM UTC, comment #3: 

Just as a quick addendum... Apple added support for a new type "instancetype" in clang, which represents the instance type of whatever class the method is running in.  They still use id as the return type for their init methods, but it strikes me that alloc/init is the perfect place to use it.

Thomas Davie <beelsebob>
Tue 16 Oct 2012 04:49:47 AM UTC, comment #2: 

I updated the code in svn.

Richard Frith-Macdonald <CaS>
Project Member
Mon 15 Oct 2012 01:56:55 PM UTC, comment #1: 

Excellent ... it seems Apple have changed their implementation to use id, so we can now do the same.

Richard Frith-Macdonald <CaS>
Project Member
Mon 15 Oct 2012 10:04:15 AM UTC, original submission:  

NSCharacterSet's various convenience constructor methods are declared in GNUstep to return NSCharacterSet , rather than id.  This causes the warning "warning: incompatible pointer types initializing 'NSMutableCharacterSet ' with an expression of type 'NSCharacterSet *' [-Wincompatible-pointer-types]" when declaring an NSMutableCharacterSet as so:

NSMutableCharacterSet *mcs = [NSMutableCharacterSet whitespaceCharacterSet];

Thomas Davie <beelsebob>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by beelsebob (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-10-16 CaS StatusNone => Fixed
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.5