Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[bug #37575] Incorrect return type for NSCharacterSet methods

10 views
Skip to first unread message

Thomas Davie

unread,
Oct 15, 2012, 6:04:16 AM10/15/12
to Thomas Davie, bug-g...@gnu.org
URL:
<http://savannah.gnu.org/bugs/?37575>

Summary: Incorrect return type for NSCharacterSet methods
Project: GNUstep
Submitted by: beelsebob
Submitted on: Mon 15 Oct 2012 10:04:15 AM GMT
Category: Base/Foundation
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any

_______________________________________________________

Details:

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];




_______________________________________________________

Reply to this item at:

<http://savannah.gnu.org/bugs/?37575>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/


Richard Frith-Macdonald

unread,
Oct 15, 2012, 9:56:55 AM10/15/12
to Richard Frith-Macdonald, Thomas Davie, bug-g...@gnu.org
Follow-up Comment #1, bug #37575 (project gnustep):

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

Richard Frith-Macdonald

unread,
Oct 16, 2012, 12:49:47 AM10/16/12
to Richard Frith-Macdonald, Thomas Davie, bug-g...@gnu.org
Update of bug #37575 (project gnustep):

Status: None => Fixed
Open/Closed: Open => Closed

_______________________________________________________

Follow-up Comment #2:

I updated the code in svn.

Thomas Davie

unread,
Oct 16, 2012, 3:13:25 AM10/16/12
to Richard Frith-Macdonald, Thomas Davie, bug-g...@gnu.org
Follow-up Comment #3, bug #37575 (project gnustep):

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.
0 new messages