OSDN Git Service

* objc/typedstream.h: Deprecate all functions in the file. This
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Sep 2010 18:02:53 +0000 (18:02 +0000)
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Sep 2010 18:02:53 +0000 (18:02 +0000)
        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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164015 138bc75d-0d04-0410-961f-82ee72b054a4

libobjc/ChangeLog
libobjc/Makefile.in
libobjc/objc/Object.h
libobjc/objc/typedstream.h

index 69af813..e79318b 100644 (file)
@@ -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.
index 891c660..0a02e0a 100644 (file)
@@ -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) \
index 6b8c6f1..b9cf037 100644 (file)
@@ -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
 
index 0d7643f..34ac061 100644 (file)
@@ -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
 }