HCoop
/
bpt
/
guile.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Heap frame "stack holders" are raw scm_vm / scm_vm_cont pointers
[bpt/guile.git]
/
libguile
/
validate.h
diff --git
a/libguile/validate.h
b/libguile/validate.h
index
b48bec7
..
68ff374
100644
(file)
--- a/
libguile/validate.h
+++ b/
libguile/validate.h
@@
-3,7
+3,8
@@
#ifndef SCM_VALIDATE_H
#define SCM_VALIDATE_H
#ifndef SCM_VALIDATE_H
#define SCM_VALIDATE_H
-/* Copyright (C) 1999,2000,2001, 2002, 2004, 2006, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002, 2004, 2006, 2007, 2009,
+ * 2011, 2012, 2013 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@
-91,11
+92,9
@@
#define SCM_NUM2ULONG_LONG_DEF(pos, arg, def) \
(SCM_UNBNDP (arg) ? def : scm_to_ulong_long (arg))
#define SCM_NUM2ULONG_LONG_DEF(pos, arg, def) \
(SCM_UNBNDP (arg) ? def : scm_to_ulong_long (arg))
-#define SCM_NUM2FLOAT(pos, arg) \
- (scm_num2float (arg, pos, FUNC_NAME))
+#define SCM_NUM2FLOAT(pos, arg) ((float) scm_to_double (arg))
-#define SCM_NUM2DOUBLE(pos, arg) \
- (scm_num2double (arg, pos, FUNC_NAME))
+#define SCM_NUM2DOUBLE(pos, arg) (scm_to_double (arg))
#define SCM_OUT_OF_RANGE(pos, arg) \
do { scm_out_of_range_pos (FUNC_NAME, arg, scm_from_int (pos)); } while (0)
#define SCM_OUT_OF_RANGE(pos, arg) \
do { scm_out_of_range_pos (FUNC_NAME, arg, scm_from_int (pos)); } while (0)
@@
-151,8
+150,9
@@
cvar = scm_to_bool (flag); \
} while (0)
cvar = scm_to_bool (flag); \
} while (0)
-#define SCM_VALIDATE_BYTEVECTOR(_pos, _obj) \
- SCM_VALIDATE_SMOB ((_pos), (_obj), bytevector)
+#define SCM_VALIDATE_BYTEVECTOR(_pos, _obj) \
+ SCM_ASSERT_TYPE (SCM_BYTEVECTOR_P (_obj), (_obj), (_pos), \
+ FUNC_NAME, "bytevector")
#define SCM_VALIDATE_CHAR(pos, scm) SCM_MAKE_VALIDATE_MSG (pos, scm, CHARP, "character")
#define SCM_VALIDATE_CHAR(pos, scm) SCM_MAKE_VALIDATE_MSG (pos, scm, CHARP, "character")
@@
-277,7
+277,7
@@
#define SCM_VALIDATE_SMOB(pos, obj, type) \
do { \
#define SCM_VALIDATE_SMOB(pos, obj, type) \
do { \
- SCM_ASSERT (SCM_
TYP16
_PREDICATE (scm_tc16_ ## type, obj), \
+ SCM_ASSERT (SCM_
SMOB
_PREDICATE (scm_tc16_ ## type, obj), \
obj, pos, FUNC_NAME); \
} while (0)
obj, pos, FUNC_NAME); \
} while (0)
@@
-293,10
+293,6
@@
#define SCM_VALIDATE_VARIABLE(pos, var) SCM_MAKE_VALIDATE_MSG (pos, var, VARIABLEP, "variable")
#define SCM_VALIDATE_VARIABLE(pos, var) SCM_MAKE_VALIDATE_MSG (pos, var, VARIABLEP, "variable")
-#define SCM_VALIDATE_MEMOIZED(pos, obj) SCM_MAKE_VALIDATE_MSG (pos, obj, MEMOIZEDP, "memoized code")
-
-#define SCM_VALIDATE_CLOSURE(pos, obj) SCM_MAKE_VALIDATE_MSG (pos, obj, CLOSUREP, "closure")
-
#define SCM_VALIDATE_PROC(pos, proc) \
do { \
SCM_ASSERT (scm_is_true (scm_procedure_p (proc)), proc, pos, FUNC_NAME); \
#define SCM_VALIDATE_PROC(pos, proc) \
do { \
SCM_ASSERT (scm_is_true (scm_procedure_p (proc)), proc, pos, FUNC_NAME); \
@@
-355,7
+351,7
@@
#define SCM_VALIDATE_ARRAY(pos, v) \
do { \
#define SCM_VALIDATE_ARRAY(pos, v) \
do { \
- SCM_ASSERT (
!SCM_IM
P (v) \
+ SCM_ASSERT (
SCM_HEAP_OBJECT_
P (v) \
&& scm_is_true (scm_array_p (v, SCM_UNDEFINED)), \
v, pos, FUNC_NAME); \
} while (0)
&& scm_is_true (scm_array_p (v, SCM_UNDEFINED)), \
v, pos, FUNC_NAME); \
} while (0)
@@
-376,8
+372,7
@@
#define SCM_VALIDATE_VTABLE(pos, v) \
do { \
#define SCM_VALIDATE_VTABLE(pos, v) \
do { \
- SCM_ASSERT (!SCM_IMP (v) && scm_is_true (scm_struct_vtable_p (v)), \
- v, pos, FUNC_NAME); \
+ SCM_ASSERT (scm_is_true (scm_struct_vtable_p (v)), v, pos, FUNC_NAME); \
} while (0)
#define SCM_VALIDATE_VECTOR_LEN(pos, v, len) \
} while (0)
#define SCM_VALIDATE_VECTOR_LEN(pos, v, len) \