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

Group
 
 

bug #37575: Incorrect return type for NSCharacterSet methods

Submitter:  Thomas Davie <beelsebob>
Submitted:  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
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    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.13-d3ae.
    Corresponding source code