source: trunk/src/gcc/libobjc/Object.m@ 1005

Last change on this file since 1005 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 8.0 KB
Line 
1/* The implementation of class Object for Objective-C.
2 Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
3
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify it
7under the terms of the GNU General Public License as published by the
8Free Software Foundation; either version 2, or (at your option) any
9later version.
10
11GNU CC is distributed in the hope that it will be useful, but WITHOUT
12ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU CC; see the file COPYING. If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
21/* As a special exception, if you link this library with files compiled
22 with GCC to produce an executable, this does not cause the resulting
23 executable to be covered by the GNU General Public License. This
24 exception does not however invalidate any other reasons why the
25 executable file might be covered by the GNU General Public License. */
26
27#include <stdarg.h>
28#include "objc/Object.h"
29#include "objc/Protocol.h"
30#include "objc/objc-api.h"
31
32extern int errno;
33
34#define MAX_CLASS_NAME_LEN 256
35
36@implementation Object
37
38+ initialize
39{
40 return self;
41}
42
43- init
44{
45 return self;
46}
47
48+ new
49{
50 return [[self alloc] init];
51}
52
53+ alloc
54{
55 return class_create_instance(self);
56}