OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc/] [execute/] [bycopy-2.m] - Blame information for rev 702

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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