Skip to content

CString, Ptr a and CInt bindings (possibly others) are missing #83

@abbradar

Description

@abbradar

I've found no mention in documentation about this, so I assume that this is a bug. For example:

#include <string.h>

{#fun strcmp as ^ { `CString', `CString' } -> `CInt' #}

Produces the following error:

c2hs: Errors during expansion of binding hooks:

test.chs:3: (column 47) [ERROR]  >>> Missing "out" marshaller!
  There is no default marshaller for this combination of Haskell and C type:
  Haskell type: CInt
  C type      : CInt

And if I switch CInt to Int, then:

c2hs: Errors during expansion of binding hooks:

test.chs:3: (column 21) [ERROR]  >>> Missing "in" marshaller!
  There is no default marshaller for this combination of Haskell and C type:
  Haskell type: CString
  C type      : (Ptr CChar)

I can use 'id' as a marshaller, but in my opinion, this is a workaround and C-types should work out of the box.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions