Ben Elliston | 88e17b5 | 1998-09-21 01:22:07 +0000 | [diff] [blame] | 1 | /* Implementation of the NXConstantString class for Objective-C. |
| 2 | Copyright (C) 1995 Free Software Foundation, Inc. |
| 3 | Contributed by Pieter J. Schoenmakers <tiggr@es.ele.tue.nl> |
| 4 | |
Nathanael Nerode | 6c82ad2 | 2003-05-23 20:04:58 +0000 | [diff] [blame^] | 5 | This file is part of GCC. |
Ben Elliston | 88e17b5 | 1998-09-21 01:22:07 +0000 | [diff] [blame] | 6 | |
Nathanael Nerode | 6c82ad2 | 2003-05-23 20:04:58 +0000 | [diff] [blame^] | 7 | GCC is free software; you can redistribute it and/or modify it |
Ben Elliston | 88e17b5 | 1998-09-21 01:22:07 +0000 | [diff] [blame] | 8 | under the terms of the GNU General Public License as published by the |
| 9 | Free Software Foundation; either version 2, or (at your option) any |
| 10 | later version. |
| 11 | |
Nathanael Nerode | 6c82ad2 | 2003-05-23 20:04:58 +0000 | [diff] [blame^] | 12 | GCC is distributed in the hope that it will be useful, but WITHOUT |
Ben Elliston | 88e17b5 | 1998-09-21 01:22:07 +0000 | [diff] [blame] | 13 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 14 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
| 15 | License for more details. |
| 16 | |
| 17 | You should have received a copy of the GNU General Public License |
Nathanael Nerode | 6c82ad2 | 2003-05-23 20:04:58 +0000 | [diff] [blame^] | 18 | along with GCC; see the file COPYING. If not, write to |
Ben Elliston | 88e17b5 | 1998-09-21 01:22:07 +0000 | [diff] [blame] | 19 | the Free Software Foundation, 59 Temple Place - Suite 330, |
| 20 | Boston, MA 02111-1307, USA. */ |
| 21 | |
| 22 | /* As a special exception, if you link this library with files |
| 23 | compiled with GCC to produce an executable, this does not cause |
| 24 | the resulting executable to be covered by the GNU General Public License. |
| 25 | This exception does not however invalidate any other reasons why |
| 26 | the executable file might be covered by the GNU General Public License. */ |
| 27 | |
| 28 | #include "objc/NXConstStr.h" |
| 29 | |
| 30 | @implementation NXConstantString |
| 31 | |
| 32 | -(const char *) cString |
| 33 | { |
| 34 | return (c_string); |
| 35 | } /* -cString */ |
| 36 | |
| 37 | -(unsigned int) length |
| 38 | { |
| 39 | return (len); |
| 40 | } /* -length */ |
| 41 | |
| 42 | @end |