* This is a simple test method to verify that the contents of a buffer created in JavaScript can be * passed into a C function. */
| 12 | * passed into a C function. |
| 13 | */ |
| 14 | void bufferTest(const void* source, unsigned int sourceLen) { |
| 15 | int i = 0; |
| 16 | unsigned char* src = (unsigned char*)source; |
| 17 | |
| 18 | printf("in test method: size of source buffer = %d\n", sourceLen); |
| 19 | |
| 20 | for (i = 0; i < sourceLen; i++) { |
| 21 | printf("source[%d] = %d\n", i, src[i]); |
| 22 | } |
| 23 | } |
| 24 |