Hi,
Version with conversion to/from string:
(define (_string/locale/len n) ; n - bytes, not characters
(make-ctype (make-array-type _byte n)
;->C
(lambda (in)
(cond
[(not in)
(make-bytes n)]
[(s
Hello,
I'm trying to make racket bindings for libgphoto2. Its API uses CameraText
struct for outputting strings, which just wraps char array.
My first attempt was:
(define _Camera-ptr (_cpointer 'Camera))
(define _CameraText-ptr (_cpointer 'CameraText))
(define-gphoto gp_camera_get_about
(_f
2 matches
Mail list logo