[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

segmenation fault

From: Catonano
Subject: segmenation fault
Date: Fri, 9 Jun 2017 09:21:35 +0200

in using the guile FFI I am having a segmentation fault

This is the C unction that I'm trying to wrap

My code is here
(configure is to be called with --with-freexl-libdir=... otherwise it won't

Here's an excerpt

(define freexl-open
  (let* ((ptr     (freexl-func "freexl_open"))
         (proc    (pointer->procedure int ptr '(* *)))
     ;;const char *path, const void **xls_handle
  (lambda (path)
    (let ((handle (scm->pointer 0))
      (path-ptr (string->pointer path)))
      (proc path-ptr handle)))))

At the REPL, when calling it with
> (freexl-open"resources/Lavoro_P.xsl")

it produces a segmentation fault

probably this line
(scm->pointer 0)
is not correct

But I don't know how to produce a void pointer and then pass it to

Thanks in advance

reply via email to

[Prev in Thread] Current Thread [Next in Thread]