Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Unified Diff: tests/srpc/cat.c

Issue 5622003: Restructure the structs/unions involved in SRPC argument passing. This will... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/ruby/main.c ('k') | tests/srpc/srpc_bidir.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/srpc/cat.c
===================================================================
--- tests/srpc/cat.c (revision 3898)
+++ tests/srpc/cat.c (working copy)
@@ -42,7 +42,7 @@
P("%d", st_size);
#undef P
}
- bufsize = out_args[0]->u.caval.count;
+ bufsize = out_args[0]->u.count;
printf("read loop, up to %d chars\n", bufsize);
if ((stb.st_mode & S_IFMT) == S_IFSHM) {
/* Chrome integration returns a shared memory descriptor for this now. */
@@ -56,10 +56,10 @@
}
for (nchar = 0; nchar < bufsize - 1; ++nchar) {
ch = file_map[nchar];
- out_args[0]->u.caval.carr[nchar] = ch;
+ out_args[0]->arrays.carr[nchar] = ch;
putchar(ch);
}
- out_args[0]->u.caval.carr[nchar] = '\0';
+ out_args[0]->arrays.carr[nchar] = '\0';
printf("EOF\n");
} else {
FILE *iob = fdopen(fd, "r");
@@ -70,15 +70,15 @@
return;
}
for (nchar = 0; EOF != (ch = getc(iob)) && nchar < bufsize-1; ++nchar) {
- out_args[0]->u.caval.carr[nchar] = ch;
+ out_args[0]->arrays.carr[nchar] = ch;
putchar(ch);
}
- out_args[0]->u.caval.carr[nchar] = '\0';
+ out_args[0]->arrays.carr[nchar] = '\0';
printf("EOF\n");
fclose(iob);
}
printf("got %d bytes\n", nchar);
- printf("out param: %.*s\n", nchar, out_args[0]->u.caval.carr);
+ printf("out param: %.*s\n", nchar, out_args[0]->arrays.carr);
rpc->result = NACL_SRPC_RESULT_OK;
done->Run(done);
}
« no previous file with comments | « tests/ruby/main.c ('k') | tests/srpc/srpc_bidir.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698