Commit 829dd9d1 authored by Juergen Nickelsen's avatar Juergen Nickelsen
Browse files

a few cosmetic renames; destroy_strbuf

parent f2e1c77e
......@@ -153,9 +153,9 @@ obp_t apply(obp_t fun, obp_t args, obp_t out_port, int level)
if (IS_BUILTIN(fun)) {
return call_builtin(fun, args, out_port, level);
} else if (IS_FORM(fun)) {
obp_t lambda = AS(fun, FUNCTION)->impl.form;
obp_t body = CDR(lambda); /* step over lambda */
obp_t params = CAR(body);
obp_t form = AS(fun, FUNCTION)->impl.form;
obp_t body = CDR(form); /* step over form */
obp_t params = CAR(body); /* formal parameters */
obp_t saved_bindings_or_error =
make_bindings(params, args, out_port, level);
CHECK_ERROR(saved_bindings_or_error);
......@@ -313,3 +313,4 @@ obp_t eval(obp_t ob, obp_t out_port, int level)
}
/* EOF */
......@@ -51,6 +51,9 @@ typedef struct OBJ_OPS {
void (*op_free)(obp_t ob);
} obj_ops_t ;
/* object operations per type
*/
obj_ops_t oops[] = {
/* INVALiD */
{
......@@ -76,7 +79,7 @@ obj_ops_t oops[] = {
{
destroy_simple
},
/* FHANDLE */
/* PORT */
{
0
},
......@@ -98,7 +101,7 @@ obj_ops_t oops[] = {
},
/* STRBUF */
{
0
destroy_strbuf
},
/* FUNCTION */
{
......@@ -135,7 +138,7 @@ char *type_name(objtype_t type)
};
if (type <= INVALiD || type >= SENTiNEL) {
return "INVALiD";
return "!INVALiD!";
} else {
return tname[type];
}
......@@ -163,10 +166,16 @@ void destroy_map(obp_t ob)
destroy_simple(ob);
}
void destroy_strbuf(obp_t ob)
{
Lstrbuf_t *ob_strbuf = AS(ob, STRBUF);
xfree(ob_strbuf->strbuf);
destroy_simple(ob);
}
/**
* Created a new object and register it so it gets included in the garbage
* Create a new object and register it so it gets included in the garbage
* collection sweep (to be).
*/
obp_t new_object(uint size, int type)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment