cons-i64   xtlang

Defined in:


;; Note the use of zone-alloc to allocate
;; enough zone memory to hold an i64list
;; zone-alloc returns a pointer to the
;; type that you ask it to allocate
;; pair is type i64list* in this case.
;; You are responsible for cleaning up
;; this memory at some point in the future!
;; (i.e. cleaning up the memory zone that this
;; heap allocation was made into)
(bind-func cons-i64
  (lambda (a:i64 b:i64list*)
    (let ((pair:i64list* (zone-alloc)))
      (tset! pair 0 a)
      (tset! pair 1 b)

Back to Index