Commit 7ddca8c6 authored by Niels Möller's avatar Niels Möller
Browse files

Handle declarations like (foo . int) properly.

Rev: src/make_class:1.8
parent 56261add
......@@ -242,14 +242,18 @@
;; (method (function int "struct this_type *self struct foo *arg") name)
(define (fix-method name var)
(case (cadr var)
`(,(car var) pointer (function ,(caddr var) ("struct " ,name " *self")
,@(cdddr var))))
`(,(car var) pointer (function ,(caddr var) ("struct " ,name " **self")
,@(cdddr var))))
(else var)))
(let ((type (var-type var))
(variable (var-name var)))
(if (atom? type)
(case (car type)
`(,variable pointer (function ,(cadr type) ("struct " ,name " *self")
,@(cddr type))))
`(,variable pointer (function ,(cadr type) ("struct " ,name " **self")
,@(cddr type))))
(else var)))))
(define (do-instance-struct name super vars)
; (werror "do-instance-struct\n")
Markdown is supported
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