123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifdef HAVE_CONFIG_H
- # include <config.h>
- #endif
- #include <libguile.h>
- #include <stdlib.h>
- static void *
- do_test (void *result)
- {
- #define LEN 123
- SCM u8v;
- scm_t_uint8 *data;
- scm_t_array_handle handle;
- data = scm_malloc (LEN);
- u8v = scm_take_u8vector (data, LEN);
- scm_array_get_handle (u8v, &handle);
- if (scm_array_handle_u8_writable_elements (&handle) == data
- && scm_array_handle_u8_elements (&handle) == data)
- * (int *) result = EXIT_SUCCESS;
- else
- * (int *) result = EXIT_FAILURE;
- scm_array_handle_release (&handle);
- return NULL;
- #undef LEN
- }
- int
- main (int argc, char *argv[])
- {
- int result;
- scm_with_guile (do_test, &result);
- return result;
- }
|