/* module-functions */ static PyObject* cons(PyObject *self, PyObject *args) /* the exposed factory-function */ { PyObject *car, *cdr; if(!PyArg_ParseTuple(args, "OO", &car, &cdr)) return 0; return (PyObject*)cons_new(car, cdr); }
pobject gc_add(pobject object) { if (object && !is_symbol(object) && !(object->flags & 0x20)) { gc_list = cons_new(object, gc_list); object->flags |= 0x20; ++gc_objects; } return object; }
pobject gc_add(pobject object) { if (object && (!is_symbol(object))) gc_list = cons_new(object, gc_list); return object; }
value_t cons_fn(vm_t *vm, value_t a, value_t b) { cons_t *result = cons_new(vm); result->car = a; result->cdr = b; return PTR_VAL(result); }
static pobject cons(pobject env, pobject params) { pobject o1 = eval(env, cons_car(params)); pobject o2 = eval(env, cons_car(cons_cdr(params))); return gc_add(cons_new(o1, o2)); }