}
}
+/* This is mainly for src/gtk/gtkio.c, so it does not need to include
+ prim.h, scheme.h and everything. */
+void
+abort_to_c (void)
+{
+ PRIMITIVE_ABORT (PRIM_RETURN_TO_C);
+ /* NOTREACHED */
+}
+
char *
callback_lunseal (CallbackKernel expected)
{
void *
arg_pointer (int argn)
{
- /* Accept an alien, string, xstring handle (positive integer),
- or zero (for a NULL pointer). */
+ /* Accept an alien, string, flovec, xstring handle (positive
+ integer), or zero (for a NULL pointer). */
SCM arg = ARG_REF (argn);
- if (integer_zero_p (arg))
+ if ((INTEGER_P (arg)) && (integer_zero_p (arg)))
return ((void *)0);
if (STRING_P (arg))
return ((void *) (STRING_POINTER (arg)));
}
if (is_alien (arg))
return (alien_address (arg));
+ if (FLONUM_P (arg))
+ return ((void *) (OBJECT_ADDRESS (arg)));
error_wrong_type_arg (argn);
/*NOTREACHED*/
return (EMPTY_LIST);
}
+int
+flovec_length (SCM vector)
+{
+ return (FLOATING_VECTOR_LENGTH (vector));
+}
+
+double*
+flovec_loc (SCM vector)
+{
+ return (FLOATING_VECTOR_LOC (vector, 0));
+}
+
+double
+flovec_ref (SCM vector, int index)
+{
+ int len = FLOATING_VECTOR_LENGTH (vector);
+ if (0 <= index && index < len)
+ return (FLOATING_VECTOR_REF (vector, index));
+ error_external_return ();
+}
+
DEFINE_PRIMITIVE ("OUTF-ERROR", Prim_outf_error, 1, 1, 0)
{
/* To avoid the normal i/o system when debugging a callback. */
extern void check_number_of_args (int num);
extern SCM unspecific (void);
extern SCM empty_list (void);
+extern int flovec_length (SCM vector);
+extern double* flovec_loc (SCM vector);
+extern double flovec_ref (SCM vector, int index);
#ifndef MIT_SCHEME /* Do not include in the microcode, just shims. */
extern SCM cons (SCM car, SCM cdr);