OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [objc/] [execute/] [bycopy-2.m] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/*
2
 * Contributed by Nicola Pero <nicola@brainstorm.co.uk>
3
 * Fri Feb  2 11:48:01 GMT 2001
4
 */
5
 
6
#include <objc/objc.h>
7
#include <objc/Object.h>
8
#include <objc/Protocol.h>
9
 
10
@protocol MyProtocol
11
+ (bycopy id<MyProtocol>) bycopyMethod;
12
@end
13
 
14
@interface MyObject : Object <MyProtocol>
15
@end
16
 
17
@implementation MyObject
18
+ (bycopy id<MyProtocol>) bycopyMethod
19
{
20
  return [MyObject alloc];
21
}
22
@end
23
 
24
int main (void)
25
{
26
  MyObject *object;
27
 
28
  object = [MyObject bycopyMethod];
29
 
30
   exit (0);
31
}
32
 
33
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.