xform drops __declspec(deprecated())
svn: r3902
This commit is contained in:
parent
ca2b00a9a3
commit
0760d57b01
|
@ -1350,7 +1350,7 @@
|
||||||
(ormap (lambda (v) (eq? (tok-n v) 'virtual)) e)) ; can't drop virtual methods!
|
(ormap (lambda (v) (eq? (tok-n v) 'virtual)) e)) ; can't drop virtual methods!
|
||||||
(if palm?
|
(if palm?
|
||||||
(add-segment-label name e)
|
(add-segment-label name e)
|
||||||
e)
|
(clean-proto e))
|
||||||
null))]
|
null))]
|
||||||
[(struct-decl? e)
|
[(struct-decl? e)
|
||||||
(if (braces? (caddr e))
|
(if (braces? (caddr e))
|
||||||
|
@ -1572,6 +1572,19 @@
|
||||||
[(eq? (tok-n (car e)) (car l))
|
[(eq? (tok-n (car e)) (car l))
|
||||||
(loop (cdr e) (cdr l))]
|
(loop (cdr e) (cdr l))]
|
||||||
[else #f])))
|
[else #f])))
|
||||||
|
|
||||||
|
(define (clean-proto e)
|
||||||
|
;; Strip __declspec(deprecated(...))
|
||||||
|
(if (and (eq? '__declspec (tok-n (car e)))
|
||||||
|
(parens? (cadr e))
|
||||||
|
(let ([l (seq->list (seq-in (cadr e)))])
|
||||||
|
(and (= 2 (length l))
|
||||||
|
(eq? 'deprecated (tok-n (car l)))
|
||||||
|
(parens? (cadr l)))))
|
||||||
|
;; Drop __declspec
|
||||||
|
(cddr e)
|
||||||
|
;; Nothing to drop
|
||||||
|
e))
|
||||||
|
|
||||||
;; e has been determined to be a function prototype.
|
;; e has been determined to be a function prototype.
|
||||||
;; Remember the information needed to convert calls
|
;; Remember the information needed to convert calls
|
||||||
|
|
Loading…
Reference in New Issue
Block a user