assert argument length
This commit is contained in:
@@ -148,6 +148,13 @@ struct {
|
|||||||
"Wrong number of arguments: expected %d, got %d", \
|
"Wrong number of arguments: expected %d, got %d", \
|
||||||
expected, actual)
|
expected, actual)
|
||||||
|
|
||||||
|
#define assert_arguments_length(expected, actual) \
|
||||||
|
do { \
|
||||||
|
if (expected != actual) { \
|
||||||
|
create_wrong_number_of_arguments_error(expected, actual); \
|
||||||
|
} \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
|
|
||||||
#define assert_type(_node, _type) \
|
#define assert_type(_node, _type) \
|
||||||
do { \
|
do { \
|
||||||
|
|||||||
+1
-1
@@ -180,7 +180,7 @@ namespace Memory {
|
|||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
proc create_lisp_object_string(char* str) -> Lisp_Object* {
|
proc create_lisp_object_string(const char* str) -> Lisp_Object* {
|
||||||
Lisp_Object* node = create_lisp_object();
|
Lisp_Object* node = create_lisp_object();
|
||||||
set_type(node, Lisp_Object_Type::String);
|
set_type(node, Lisp_Object_Type::String);
|
||||||
node->value.string = create_string(str);
|
node->value.string = create_string(str);
|
||||||
|
|||||||
Reference in New Issue
Block a user