Commit 4470254f by Nicola Pero Committed by Nicola Pero

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
parent 7d124e66
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> 2010-09-08 Nicola Pero <nicola.pero@meta-innovation.com>
Removed obsolete intermediate threading layer. Removed obsolete intermediate threading layer.
......
...@@ -167,7 +167,11 @@ runtime-info.h: ...@@ -167,7 +167,11 @@ runtime-info.h:
rm -f tmp-runtime.m tmp-runtime.s rm -f tmp-runtime.m tmp-runtime.s
archive_gc.lo: archive.c 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) $< $(INCLUDES) $<
class_gc.lo: class.c class_gc.lo: class.c
...@@ -217,13 +221,15 @@ NXConstStr_gc.lo: NXConstStr.m ...@@ -217,13 +221,15 @@ NXConstStr_gc.lo: NXConstStr.m
$(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \ $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \
$(OBJC_GCFLAGS) $(INCLUDES) $< $(OBJC_GCFLAGS) $(INCLUDES) $<
# -Wno-deprecated-declarations is for the objc/typedstream.h functions.
Object.lo: Object.m Object.lo: Object.m
$(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \ $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -Wno-deprecated-declarations \
$(INCLUDES) $< -c -o $@ $(ALL_CFLAGS) $(INCLUDES) $<
# -Wno-deprecated-declarations is for the objc/typedstream.h functions.
Object_gc.lo: Object.m Object_gc.lo: Object.m
$(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -c -o $@ $(ALL_CFLAGS) \ $(LIBTOOL_COMPILE) $(CC) -fgnu-runtime -Wno-deprecated-declarations \
$(OBJC_GCFLAGS) $(INCLUDES) $< -c -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) $(INCLUDES) $<
objects_gc.lo: objects.c objects_gc.lo: objects.c
$(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \ $(LIBTOOL_COMPILE) $(CC) -c $(ALL_CFLAGS) -o $@ $(OBJC_GCFLAGS) \
......
/* Interface for the Object class for Objective-C. /* 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. This file is part of GCC.
...@@ -33,9 +33,23 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -33,9 +33,23 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
extern "C" { extern "C" {
#endif #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, All classes are derived from Object. As such,
* this is the overhead tacked onto those objects. this is the overhead tacked onto those objects.
*/ */
@interface Object @interface Object
{ {
...@@ -116,11 +130,15 @@ extern "C" { ...@@ -116,11 +130,15 @@ extern "C" {
/* Archiving */ /* Archiving */
+ (int)version; + (int)version;
+ + setVersion:(int)aVersion; + + setVersion:(int)aVersion;
+ (int)streamVersion: (TypedStream*)aStream;
- - read: (TypedStream*)aStream; /* The following methods were deprecated in GCC 4.6.0 and will be removed in the next
- - write: (TypedStream*)aStream; GCC release.
- - awake; */
+ (int)streamVersion: (TypedStream*)aStream; /* __attribute__ ((deprecated)) */
- - read: (TypedStream*)aStream; /* __attribute__ ((deprecated)) */
- - write: (TypedStream*)aStream; /* __attribute__ ((deprecated)) */
- - awake; /* __attribute__ ((deprecated)) */
@end @end
......
...@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifndef __typedstream_INCLUDE_GNU #ifndef __typedstream_INCLUDE_GNU
#define __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 "objc.h"
#include "hash.h" #include "hash.h"
...@@ -94,16 +98,16 @@ typedef struct objc_typed_stream { ...@@ -94,16 +98,16 @@ typedef struct objc_typed_stream {
** arguments are pointers to the objects to read/write. ** arguments are pointers to the objects to read/write.
*/ */
int objc_write_type (TypedStream* stream, const char* type, const 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); int objc_read_type (TypedStream* stream, const char* type, void* data) __attribute__ ((deprecated));
int objc_write_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, ...); int objc_read_types (TypedStream* stream, const char* type, ...) __attribute__ ((deprecated));
int objc_write_object_reference (TypedStream* stream, id object); int objc_write_object_reference (TypedStream* stream, id object) __attribute__ ((deprecated));
int objc_write_root_object (TypedStream* stream, id object); 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); ...@@ -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 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 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_write_object (TypedStream* stream, id object) __attribute__ ((deprecated));
int objc_read_object (TypedStream* stream, id* object); int objc_read_object (TypedStream* stream, id* object) __attribute__ ((deprecated));
...@@ -125,13 +129,13 @@ int objc_read_object (TypedStream* stream, id* object); ...@@ -125,13 +129,13 @@ int objc_read_object (TypedStream* stream, id* object);
** OBJC_READONLY or OBJC_WRITEONLY. ** OBJC_READONLY or OBJC_WRITEONLY.
*/ */
TypedStream* objc_open_typed_stream (FILE* physical, 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); 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); BOOL objc_end_of_typed_stream (TypedStream* stream) __attribute__ ((deprecated));
void objc_flush_typed_stream (TypedStream* stream); void objc_flush_typed_stream (TypedStream* stream) __attribute__ ((deprecated));
#ifdef __cplusplus #ifdef __cplusplus
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment