1 /* A small NSConstantString implementation for use with the NeXT runtime.
2    Copyright (C) 2011 Free Software Foundation, Inc.
3 
4 This file is part of GCC.
5 
6 GCC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
9 any later version.
10 
11 GCC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3.  If not see
18 <http://www.gnu.org/licenses/>.  */
19 
20 #ifndef _test_suite_nsconstantstring_class_h_
21 #define _test_suite_nsconstantstring_class_h_
22 #ifdef __NEXT_RUNTIME__
23 
24 /* On full-fledged Mac OS X systems, NSConstantString is provided
25    as part of the Foundation framework.  However, on bare Darwin systems,
26    Foundation is not included, and hence there is no NSConstantString
27    implementation to link against.
28 
29    This code is derived from the GNU runtime's NXConstantString implementation.
30 */
31 
32 #include "objc-test-suite-types.h"
33 
34 extern TNS_STRING_REF_T _NSConstantStringClassReference;
35 
36 @interface NSConstantString
37 {
38   Class isa;
39   char *c_string;
40   unsigned int len;
41 }
42 
43 + (id) initialize;
44 
45 - (const char *) cString;
46 - (unsigned int) length;
47 
48 @end
49 
50 #endif /* __NEXT_RUNTIME__ */
51 #endif /* _test_suite_nsconstantstring_class_h_ */
52