1 /* Copyright (C) 2009 Free Software Foundation, Inc.
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public License
5 * as published by the Free Software Foundation; either version 3 of
6 * the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 /* Make sure `scm_take_u8vector ()' returns a u8vector that actually uses the
33 do_test (void *result
)
38 scm_t_array_handle handle
;
40 data
= scm_malloc (LEN
);
41 u8v
= scm_take_u8vector (data
, LEN
);
43 scm_array_get_handle (u8v
, &handle
);
45 if (scm_array_handle_u8_writable_elements (&handle
) == data
46 && scm_array_handle_u8_elements (&handle
) == data
)
47 * (int *) result
= EXIT_SUCCESS
;
49 * (int *) result
= EXIT_FAILURE
;
51 scm_array_handle_release (&handle
);
58 main (int argc
, char *argv
[])
62 scm_with_guile (do_test
, &result
);