mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Code cleanups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28770 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2f0e07d89a
commit
3f7f5e5410
8 changed files with 312 additions and 1897 deletions
|
@ -93,6 +93,7 @@ int con_data (id prx)
|
|||
id obj;
|
||||
small_struct small = {12};
|
||||
foo ffoo = {'Z', 1234.5678, 99, "cow", 9876543};
|
||||
foo bck;
|
||||
|
||||
printf("Testing data sending\n");
|
||||
|
||||
|
@ -214,11 +215,13 @@ int con_data (id prx)
|
|||
#if 1 || !defined(__MINGW32__)
|
||||
pool = [NSAutoreleasePool new];
|
||||
printf("Struct:\n");
|
||||
memcpy(&bck, &ffoo, sizeof(bck));
|
||||
printf(" sending c='%c',d=%g,i=%d,s=%s,l=%ld",
|
||||
ffoo.c, ffoo.d, ffoo.i, ffoo.s, ffoo.l);
|
||||
ffoo = [prx sendStruct: ffoo];
|
||||
printf(" got c='%c',d=%g,i=%d,s=%s,l=%ld\n",
|
||||
ffoo.c, ffoo.d, ffoo.i, ffoo.s, ffoo.l);
|
||||
memcpy(&ffoo, &bck, sizeof(bck));
|
||||
printf(" sending ptr to c='%c',d=%g,i=%d,s=%s,l=%ld",
|
||||
ffoo.c, ffoo.d, ffoo.i, ffoo.s, ffoo.l);
|
||||
[prx getStruct: &ffoo];
|
||||
|
|
|
@ -291,8 +291,11 @@
|
|||
|
||||
- (void) getObject: (id *)str
|
||||
{
|
||||
static NSString *ret = @"hello";
|
||||
printf ("(%s) got object (%s)\n", GSNameFromSelector(_cmd),
|
||||
GSClassNameFromObject(*str));
|
||||
*str = ret;
|
||||
printf(" returning (%s)\n", [*str cString]);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
|
@ -307,8 +310,9 @@
|
|||
|
||||
- (void) getString: (char **)str
|
||||
{
|
||||
static char *ret = "hello";
|
||||
printf ("(%s) got string (%s)", GSNameFromSelector(_cmd), *str);
|
||||
(*str)[0] = 'N';
|
||||
*str = ret;
|
||||
printf(" returning (%s)\n", *str);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue