source: project/release/5/coops-utils/trunk/object-uword-ref.scm @ 38766

Last change on this file since 38766 was 38766, checked in by Kon Lovett, 3 months ago

fix uword ref syntax signature, bump version

File size: 633 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)
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.