Commit 6773832f authored by Niels Möller's avatar Niels Möller
Browse files

Optional third argument in (pointer ...) declarations.

Rev: src/make_class:1.5
parent 00613691
......@@ -116,7 +116,21 @@
(case (car type)
((string simple function space bignum) #f)
((object) (list "mark((struct lsh_object *) " expr ");\n"))
((pointer) (type->mark (cadr type) (list "*(" expr ")")))
((pointer) (if (null? (cddr type))
(type->mark (cadr type) (list "*(" expr ")"))
;; The optional argument should be the name of
;; an instance variable holding the length of
;; the area pointed to
(let ((mark-k (type->mark (cadr type)
(list "(" expr ")[k]"))))
(and mark-k
(list "{\n unsigned k;\n"
" for (k=0; k<i->" (caddr type)
"; k++)\n"
" " mark-k
((special) (let ((mark-fn (caddr type)))
(and mark-fn (list mark-fn "(" expr ", mark);\n"))))
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