Permalink
Browse files

s/int8_t/char/ (C89 compat)

  • Loading branch information...
1 parent bf396de commit 463824511321269e76b35479aaaf7376929bac68 @jnthn committed Mar 17, 2013
Showing with 4 additions and 4 deletions.
  1. +3 −3 t/05-arrays.c
  2. +1 −1 t/06-struct.c
View
@@ -61,15 +61,15 @@ DLLEXPORT void TakeAStructArray(Struct **structs) {
printf("ok - struct in position 2, C-side\n");
}
-DLLEXPORT int8_t *ReturnsAByteArray() {
- int8_t *arr = malloc(3*sizeof(int8_t));
+DLLEXPORT char *ReturnsAByteArray() {
+ char *arr = malloc(3*sizeof(char));
arr[0] = 100;
arr[1] = 90;
arr[2] = 80;
return arr;
}
-DLLEXPORT void TakeAByteArray(int8_t *bytes) {
+DLLEXPORT void TakeAByteArray(char *bytes) {
if(bytes[0] != 31) printf("not ");
printf("ok - byte in position 0, C-side\n");
if(bytes[1] != 28) printf("not ");
View
@@ -11,7 +11,7 @@
typedef struct {
long intval;
double numval;
- int8_t byteval;
+ char byteval;
float floatval;
long *arr;
} MyStruct;

0 comments on commit 4638245

Please sign in to comment.