FFI wrong struct alignment

Create issue
Issue #274 resolved
Takashi Kato repo owner created an issue

The offset of g must be 40 but this prints 72

(import (rnrs)
    (sagittarius ffi))
(define-c-struct RECT
  (int x)
  (int y)
  (int w)
  (int h))

(define-c-struct FOO
  (int a)
  (int b)
  (int c)
  (int d)
  (int i)
  (void* e)
  (void* f)
  (struct RECT g)
  (long h))

(describe-c-struct FOO)

Comments (1)

  1. Log in to comment