Skip to content

Closure for typedefs function pointers #45

Description

@ghostjat

Hi, i am trying to call IUP toolkit lib click_cb callback function which has following def
typedef int (*IFnii)(Ihandle*, int, int);

in php

function click_cb (FFI\CData $ih, FFI\CData $l, FFI\CData $c) {
      echo $lin = FFI::cast('int',$l)->cdata;
      echo $col = FFI:cast('int', $c)->cdata;
 };

Fatal error: Uncaught FFI\Exception: Attempt to assign an invalid callback, insufficient number of arguments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions