Last change
on this file since 38763 was
38763,
checked in by Kon Lovett, 7 months ago
|
fix cond-expand else clause w/ multiple values using begin
|
File size:
638 bytes
|
Line | |
---|
1 | ;;;; object-uword-ref.scm |
---|
2 | ;;;; Kon Lovett, Mar '20 |
---|
3 | |
---|
4 | ;; Issues |
---|
5 | ;; |
---|
6 | |
---|
7 | (cond-expand |
---|
8 | (64bit |
---|
9 | (begin |
---|
10 | (define-constant C_UWORD_SIZE 8) |
---|
11 | (define-syntax pointer-uword-ref |
---|
12 | (syntax-rules () |
---|
13 | ((pointer-uword-ref ?ptr) |
---|
14 | (pointer-u64-ref ?ptr) ) ) ) ) ) |
---|
15 | (else |
---|
16 | (begin |
---|
17 | (define-constant C_UWORD_SIZE 4) |
---|
18 | (define-syntax pointer-uword-ref |
---|
19 | (syntax-rules () |
---|
20 | ((pointer-uword-ref ?ptr ?idx) |
---|
21 | (pointer-u32-ref ?ptr) ) ) ) ) ) ) |
---|
22 | |
---|
23 | (define-inline (object-uword-ref proc #!optional (idx 0)) |
---|
24 | (pointer-uword-ref (pointer+ (object->pointer proc) (* C_UWORD_SIZE (add1 idx)))) ) |
---|
Note: See
TracBrowser
for help on using the repository browser.