aboutsummaryrefslogtreecommitdiff
path: root/libobjc/objc/deprecated
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2010-09-10 09:56:40 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-09-10 09:56:40 +0000
commite976a775e259c5a85907a4b4e9a2b707c7ce9cca (patch)
treeaecc8134138b797706917530127f1a76bf0da100 /libobjc/objc/deprecated
parent1c732eb7229d03addf86b550c8e8c0123d98d729 (diff)
downloadgcc-e976a775e259c5a85907a4b4e9a2b707c7ce9cca.zip
gcc-e976a775e259c5a85907a4b4e9a2b707c7ce9cca.tar.gz
gcc-e976a775e259c5a85907a4b4e9a2b707c7ce9cca.tar.bz2
deprecated: New directory.
* libobjc/objc/deprecated: New directory. * libobjc/objc/deprecated/README: New file. * libobjc/objc/README: New file. * libobjc/objc/typedstream.h: Moved into objc/deprecated/typedstream.h; objc/typedstream.h replaced with a placeholder including the file from the deprecated/ directory. * libobjc/objc/deprecated/objc-unexpected-exception.h: New file with the definition of _objc_unexpected_exception. * libobjc/objc/objc-api.h: Include deprecated/objc-unexcepted-exception.h instead of defining _objc_unexpected_exception. * libobjc/objc/deprecated/Object.h: New file with the deprecated Object methods in a 'Deprecated' category. * libobjc/objc/Object.h Include deprecated/Object.h instead of defining the deprecated methods. * libobjc/Object.m: Moved deprecated methods into 'Deprecated' category. * libobjc/objc-private: New directory. * libobjc/objc-private/README: New file. * libobjc/Makefile.in (OBJC_DEPRECATED_H): New variable. (install-headers): Create installation directory for OBJC_DEPRECATED_H headers, and install them. From-SVN: r164153
Diffstat (limited to 'libobjc/objc/deprecated')
-rw-r--r--libobjc/objc/deprecated/Object.h13
-rw-r--r--libobjc/objc/deprecated/README11
-rw-r--r--libobjc/objc/deprecated/objc-unexpected-exception.h9
-rw-r--r--libobjc/objc/deprecated/typedstream.h141
4 files changed, 174 insertions, 0 deletions
diff --git a/libobjc/objc/deprecated/Object.h b/libobjc/objc/deprecated/Object.h
new file mode 100644
index 0000000..0241f0f
--- /dev/null
+++ b/libobjc/objc/deprecated/Object.h
@@ -0,0 +1,13 @@
+@interface Object (Deprecated)
+
+/* 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/deprecated/README b/libobjc/objc/deprecated/README
new file mode 100644
index 0000000..3f10519
--- /dev/null
+++ b/libobjc/objc/deprecated/README
@@ -0,0 +1,11 @@
+This directory contains declarations and features that are deprecated
+and that will be removed in future versions of the compiler.
+
+Note that files in this directory are not really usable headers on
+their own - they shouldn't be included directly by end users. They
+are header fragments containing deprecated APIs that are still
+included (until removed) from the real headers in objc/.
+
+Files in this directory should not #include any other objc header.
+Any include that they need should be done in the real objc/ headers
+before including these fragments.
diff --git a/libobjc/objc/deprecated/objc-unexpected-exception.h b/libobjc/objc/deprecated/objc-unexpected-exception.h
new file mode 100644
index 0000000..69ffd4e
--- /dev/null
+++ b/libobjc/objc/deprecated/objc-unexpected-exception.h
@@ -0,0 +1,9 @@
+/*
+** Hook for uncaught exceptions. This hook is called when an
+** exception is thrown and no valid exception handler is in place.
+** The function is expected never to return. If the function returns
+** the result is currently undefined. This is deprecated. Please use
+** objc_set_uncaught_exception_handler() from objc/objc-exception.h
+** instead.
+*/
+objc_EXPORT void (*_objc_unexpected_exception)(id) __attribute__ ((deprecated));
diff --git a/libobjc/objc/deprecated/typedstream.h b/libobjc/objc/deprecated/typedstream.h
new file mode 100644
index 0000000..4d948d5
--- /dev/null
+++ b/libobjc/objc/deprecated/typedstream.h
@@ -0,0 +1,141 @@
+/* GNU Objective-C Typed Streams interface.
+ Copyright (C) 1993, 1995, 2004, 2009 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3, or (at your option) any
+later version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+License for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+
+#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 <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+typedef int (*objc_typed_read_func)(void*, char*, int);
+typedef int (*objc_typed_write_func)(void*, const char*, int);
+typedef int (*objc_typed_flush_func)(void*);
+typedef int (*objc_typed_eof_func)(void*);
+
+#define OBJC_READONLY 0x01
+#define OBJC_WRITEONLY 0x02
+
+#define OBJC_MANAGED_STREAM 0x01
+#define OBJC_FILE_STREAM 0x02
+#define OBJC_MEMORY_STREAM 0x04
+
+#define OBJC_TYPED_STREAM_VERSION 0x01
+
+typedef struct objc_typed_stream {
+ void* physical;
+ cache_ptr object_table; /* read/written objects */
+ cache_ptr stream_table; /* other read/written but shared things.. */
+ cache_ptr class_table; /* class version mapping */
+ cache_ptr object_refs; /* forward references */
+ int mode; /* OBJC_READONLY or OBJC_WRITEONLY */
+ int type; /* MANAGED, FILE, MEMORY etc bit string */
+ int version; /* version used when writing */
+ int writing_root_p;
+ objc_typed_read_func read;
+ objc_typed_write_func write;
+ objc_typed_eof_func eof;
+ objc_typed_flush_func flush;
+} TypedStream;
+
+/* opcode masks */
+#define _B_VALUE 0x1fU
+#define _B_CODE 0xe0U
+#define _B_SIGN 0x10U
+#define _B_NUMBER 0x0fU
+
+/* standard opcodes */
+#define _B_INVALID 0x00U
+#define _B_SINT 0x20U
+#define _B_NINT 0x40U
+#define _B_SSTR 0x60U
+#define _B_NSTR 0x80U
+#define _B_RCOMM 0xa0U
+#define _B_UCOMM 0xc0U
+#define _B_EXT 0xe0U
+
+/* eXtension opcodes */
+#define _BX_OBJECT 0x00U
+#define _BX_CLASS 0x01U
+#define _BX_SEL 0x02U
+#define _BX_OBJREF 0x03U
+#define _BX_OBJROOT 0x04U
+#define _BX_EXT 0x1fU
+
+/*
+** Read and write objects as specified by TYPE. All the `last'
+** arguments are pointers to the objects to read/write.
+*/
+
+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, ...) __attribute__ ((deprecated));
+int objc_read_types (TypedStream* stream, const char* type, ...) __attribute__ ((deprecated));
+
+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) __attribute__ ((deprecated));
+
+
+/*
+** Convenience functions
+*/
+
+int objc_write_array (TypedStream* stream, const char* type,
+ int count, const void* data) __attribute__ ((deprecated));
+int objc_read_array (TypedStream* stream, const char* type,
+ int count, void* data) __attribute__ ((deprecated));
+
+int objc_write_object (TypedStream* stream, id object) __attribute__ ((deprecated));
+int objc_read_object (TypedStream* stream, id* object) __attribute__ ((deprecated));
+
+
+
+/*
+** Open a typed stream for reading or writing. MODE may be either of
+** OBJC_READONLY or OBJC_WRITEONLY.
+*/
+
+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) __attribute__ ((deprecated));
+
+BOOL objc_end_of_typed_stream (TypedStream* stream) __attribute__ ((deprecated));
+void objc_flush_typed_stream (TypedStream* stream) __attribute__ ((deprecated));
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* not __typedstream_INCLUDE_GNU */