xref: /netbsd-src/external/gpl3/gcc/dist/libobjc/Object.m (revision b1e838363e3c6fc78a55519254d99869742dd33c)
14fee23f9Smrg/* The implementation of class Object for Objective-C.
2*b1e83836Smrg   Copyright (C) 1993-2022 Free Software Foundation, Inc.
34fee23f9Smrg
44fee23f9SmrgThis file is part of GCC.
54fee23f9Smrg
64fee23f9SmrgGCC is free software; you can redistribute it and/or modify it
74fee23f9Smrgunder the terms of the GNU General Public License as published by the
84fee23f9SmrgFree Software Foundation; either version 3, or (at your option) any
94fee23f9Smrglater version.
104fee23f9Smrg
114fee23f9SmrgGCC is distributed in the hope that it will be useful, but WITHOUT
124fee23f9SmrgANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
134fee23f9SmrgFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
144fee23f9SmrgLicense for more details.
154fee23f9Smrg
164fee23f9SmrgUnder Section 7 of GPL version 3, you are granted additional
174fee23f9Smrgpermissions described in the GCC Runtime Library Exception, version
184fee23f9Smrg3.1, as published by the Free Software Foundation.
194fee23f9Smrg
204fee23f9SmrgYou should have received a copy of the GNU General Public License and
214fee23f9Smrga copy of the GCC Runtime Library Exception along with this program;
224fee23f9Smrgsee the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
234fee23f9Smrg<http://www.gnu.org/licenses/>.  */
244fee23f9Smrg
2548fb7bfaSmrg#include "objc-private/common.h"
264fee23f9Smrg#include "objc/Object.h"
2748fb7bfaSmrg#include "objc/runtime.h"
284fee23f9Smrg
294fee23f9Smrg@implementation Object
304fee23f9Smrg
314fee23f9Smrg- (Class)class
324fee23f9Smrg{
3348fb7bfaSmrg  return object_getClass (self);
344fee23f9Smrg}
354fee23f9Smrg
3648fb7bfaSmrg- (BOOL)isEqual: (id)anObject
374fee23f9Smrg{
384fee23f9Smrg  return self == anObject;
394fee23f9Smrg}
404fee23f9Smrg
414fee23f9Smrg@end
42