aboutsummaryrefslogtreecommitdiff
path: root/libobjc
diff options
context:
space:
mode:
authorNicola Pero <nicola@nicola.brainstorm.co.uk>2010-09-08 18:02:53 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-09-08 18:02:53 +0000
commit4470254f1a06ae1fe9548902f079d2dd8bc74692 (patch)
tree5c405286f56fc917530095b41f63d842bbe64e8f /libobjc
parent7d124e66cab77a2ca9e09518a36bdd3b6e5c830b (diff)
downloadgcc-4470254f1a06ae1fe9548902f079d2dd8bc74692.zip
gcc-4470254f1a06ae1fe9548902f079d2dd8bc74692.tar.gz
gcc-4470254f1a06ae1fe9548902f079d2dd8bc74692.tar.bz2
typedstream.h: Deprecate all functions in the file.
* objc/typedstream.h: Deprecate all functions in the file. This file is obsolete. * objc/Object.h ([+streamVersion:], [-read:], [-write:], [-awake]): Documented that these methods are deprecated. Added a brief description of the Object class and its relationship to the NSObject class. * Makefile.in: Compile archive.c and Object.m with -Wno-deprecated-declarations. From-SVN: r164015
Diffstat (limited to 'libobjc')
-rw-r--r--libobjc/ChangeLog11
-rw-r--r--libobjc/Makefile.in16
-rw-r--r--libobjc/objc/Object.h32
-rw-r--r--libobjc/objc/typedstream.h36
4 files changed, 67 insertions, 28 deletions
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index 69af813..e79318b 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -1,3 +1,14 @@
+2010-09-08 Nicola Pero <nicola@nicola.brainstorm.co.uk>
+
+ * objc/typedstream.h: Deprecate all functions in the file. This
+ file is obsolete.
+ * objc/Object.h ([+streamVersion:], [-read:], [-write:],
+ [-awake]): Documented that these methods are deprecated. Added a
+ brief description of the Object class and its relationship to the
+ NSObject class.
+ * Makefile.in: Compile archive.c and Object.m with
+ -Wno-deprecated-declarations.
+
2010-09-08 Nicola Pero <nicola.pero@meta-innovation.com>
Removed obsolete intermediate threading layer.
diff --git a/libobjc/Makefile.in b/libobjc/Makefile.in
index 891c660..0a02e0a 100644
--- a/libobjc/Makefile.in
+++ b/libobjc/Makefile.in
@@ -167,7 +167,11 @@ runtime-info.h:
rm -f tmp-runtime.m tmp-runtime.s
archive_gc.lo: archive.c
- $(LIBTOOL_COMPILE) $(CC) -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \
+ $(LIBTOOL_COMPILE) $(CC) -Wno-deprecated-declarations -c -o $@ $(ALL_CFLAGS) \
+ $(OBJC_GCFLAGS) $(INCLUDES) $<
+
+archive.lo: archive.c
+ $(LIBTOOL_COMPILE) $(CC) -Wno-deprecated-declarations -c $(ALL_CFLAGS) \
$(INCLUDES) $<
class_gc.lo: class.c
@@ -217,13 +221,15 @@ NXConstStr_gc.lo: NXConstStr.m
$(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
$(OBJC_GCFLAGS) $(INCLUDES) $<
+# -Wno-deprecated-declarations is for the objc/typedstream.h functions.
Object.lo: Object.m
- $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
- $(INCLUDES) $<
+ $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -Wno-deprecated-declarations \
+ -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
+# -Wno-deprecated-declarations is for the objc/typedstream.h functions.
Object_gc.lo: Object.m
- $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
- $(OBJC_GCFLAGS) $(INCLUDES) $<
+ $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -Wno-deprecated-declarations \
+ -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
objects_gc.lo: objects.c
$(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
diff --git a/libobjc/objc/Object.h b/libobjc/objc/Object.h
index 6b8c6f1..b9cf037 100644
--- a/libobjc/objc/Object.h
+++ b/libobjc/objc/Object.h
@@ -1,5 +1,5 @@
/* Interface for the Object class for Objective-C.
- Copyright (C) 1993, 1994, 1995, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 2009, 2010 Free Software Foundation, Inc.
This file is part of GCC.
@@ -33,9 +33,23 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
extern "C" {
#endif
+/* The Object class is a minimal (but fully functional) root class
+ included with the runtime.
+
+ It is mostly for testing the runtime; very handy in configure
+ tests, and when writing language/runtime testcases.
+
+ Because Objective-C allows multiple root classes, a Foundation
+ library (such as GNUstep-base) is expected to provide its own root
+ class (typically called NSObject), fully integrated with the
+ library's own high-level features. If you are using such a
+ Foundation library, you should most likely use its root class for
+ everything and ignore Object.
+*/
+
/*
- * All classes are derived from Object. As such,
- * this is the overhead tacked onto those objects.
+ All classes are derived from Object. As such,
+ this is the overhead tacked onto those objects.
*/
@interface Object
{
@@ -116,11 +130,15 @@ extern "C" {
/* Archiving */
+ (int)version;
+ setVersion:(int)aVersion;
-+ (int)streamVersion: (TypedStream*)aStream;
-- read: (TypedStream*)aStream;
-- write: (TypedStream*)aStream;
-- awake;
+/* The following methods were deprecated in GCC 4.6.0 and will be removed in the next
+ GCC release.
+*/
++ (int)streamVersion: (TypedStream*)aStream; /* __attribute__ ((deprecated)) */
+
+- read: (TypedStream*)aStream; /* __attribute__ ((deprecated)) */
+- write: (TypedStream*)aStream; /* __attribute__ ((deprecated)) */
+- awake; /* __attribute__ ((deprecated)) */
@end
diff --git a/libobjc/objc/typedstream.h b/libobjc/objc/typedstream.h
index 0d7643f..34ac061 100644
--- a/libobjc/objc/typedstream.h
+++ b/libobjc/objc/typedstream.h
@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifndef __typedstream_INCLUDE_GNU
#define __typedstream_INCLUDE_GNU
+/* The API in this file was entirely deprecated in GCC 4.6.0 and will
+ be removed in the following GCC release.
+*/
+
#include "objc.h"
#include "hash.h"
@@ -94,16 +98,16 @@ typedef struct objc_typed_stream {
** arguments are pointers to the objects to read/write.
*/
-int objc_write_type (TypedStream* stream, const char* type, const void* data);
-int objc_read_type (TypedStream* stream, const char* type, void* data);
+int objc_write_type (TypedStream* stream, const char* type, const void* data) __attribute__ ((deprecated));
+int objc_read_type (TypedStream* stream, const char* type, void* data) __attribute__ ((deprecated));
-int objc_write_types (TypedStream* stream, const char* type, ...);
-int objc_read_types (TypedStream* stream, const char* type, ...);
+int objc_write_types (TypedStream* stream, const char* type, ...) __attribute__ ((deprecated));
+int objc_read_types (TypedStream* stream, const char* type, ...) __attribute__ ((deprecated));
-int objc_write_object_reference (TypedStream* stream, id object);
-int objc_write_root_object (TypedStream* stream, id object);
+int objc_write_object_reference (TypedStream* stream, id object) __attribute__ ((deprecated));
+int objc_write_root_object (TypedStream* stream, id object) __attribute__ ((deprecated));
-long objc_get_stream_class_version (TypedStream* stream, Class class_type);
+long objc_get_stream_class_version (TypedStream* stream, Class class_type) __attribute__ ((deprecated));
/*
@@ -111,12 +115,12 @@ long objc_get_stream_class_version (TypedStream* stream, Class class_type);
*/
int objc_write_array (TypedStream* stream, const char* type,
- int count, const void* data);
+ int count, const void* data) __attribute__ ((deprecated));
int objc_read_array (TypedStream* stream, const char* type,
- int count, void* data);
+ int count, void* data) __attribute__ ((deprecated));
-int objc_write_object (TypedStream* stream, id object);
-int objc_read_object (TypedStream* stream, id* object);
+int objc_write_object (TypedStream* stream, id object) __attribute__ ((deprecated));
+int objc_read_object (TypedStream* stream, id* object) __attribute__ ((deprecated));
@@ -125,13 +129,13 @@ int objc_read_object (TypedStream* stream, id* object);
** OBJC_READONLY or OBJC_WRITEONLY.
*/
-TypedStream* objc_open_typed_stream (FILE* physical, int mode);
-TypedStream* objc_open_typed_stream_for_file (const char* file_name, int mode);
+TypedStream* objc_open_typed_stream (FILE* physical, int mode) __attribute__ ((deprecated));
+TypedStream* objc_open_typed_stream_for_file (const char* file_name, int mode) __attribute__ ((deprecated));
-void objc_close_typed_stream (TypedStream* stream);
+void objc_close_typed_stream (TypedStream* stream) __attribute__ ((deprecated));
-BOOL objc_end_of_typed_stream (TypedStream* stream);
-void objc_flush_typed_stream (TypedStream* stream);
+BOOL objc_end_of_typed_stream (TypedStream* stream) __attribute__ ((deprecated));
+void objc_flush_typed_stream (TypedStream* stream) __attribute__ ((deprecated));
#ifdef __cplusplus
}