More byref testing

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13162 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-03-20 06:11:36 +00:00
parent dbb4f4327f
commit ae92fb6e16
3 changed files with 16 additions and 2 deletions

View file

@ -256,8 +256,14 @@ con_messages (id prx)
#ifdef _F_BYREF
[prx sendByref: obj];
[prx sendByref:@"hello"];
[prx sendByref:[NSDate date]];
[prx sendByref: @"hello"];
[prx sendByref: [NSDate date]];
{
NSMutableString *str = [NSMutableString string];
[prx modifyByref: str];
printf(" Modified '%s'\n", [str lossyCString]);
}
#endif
printf(" ok\n");

View file

@ -367,6 +367,13 @@
fflush(stdout);
return self;
}
- modifyByref: (byref NSMutableString *)o
{
printf(" >> byref class is %s\n", object_get_class_name (o));
fflush(stdout);
[o appendString: @"hello"];
return self;
}
#endif
- manyArgs: (int)i1 : (int)i2 : (int)i3 : (int)i4 : (int)i5 : (int)i6

View file

@ -64,6 +64,7 @@ struct myarray {
- sendBycopy: (bycopy id)o;
#ifdef _F_BYREF
- sendByref: (byref id)o;
- modifyByref: (byref NSMutableString *)o;
#endif
- manyArgs: (int)i1 : (int)i2 : (int)i3 : (int)i4 : (int)i5 : (int)i6
: (int)i7 : (int)i8 : (int)i9 : (int)i10 : (int)i11 : (int)i12;