This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

order of macro expansion


Hello.

I would like to know if there is a way to manage (or at least predict)
macros expansion. For example, I have the following code:

---------------
; this expands to a sequence of "define-alias" calls
(imports
  ....
  ("android.graphics" (Bitmap Paint Canvas)))

; if I comment out this declaration, compilation fails complaining about
unknown
; the "imports" above will result the same, and it works for other
usages
(define-alias Bitmap <android.graphics.Bitmap>)

(define-simple-class TestActivity (Activity) class-name:
"net.max630.android.test.TestActivity"
    ....
    (bitmap1 :: Bitmap)
    (bitmap2 :: Bitmap)
)
---------------

Here, the aliased in macro classes are not visible in field
declarations. I suppose this happens because it compiles
"define-simple-class" before fully expanding "imports". I could also
remember several other cases where I had similar problems.

Thanks,
-- 
Max


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]