diff options
author | daniel <danieruru@gmail.com> | 2013-01-11 20:37:30 +0900 |
---|---|---|
committer | daniel <danieruru@gmail.com> | 2013-01-11 20:37:30 +0900 |
commit | 6b74097642353500f965bdc024c76051c090b4f4 (patch) | |
tree | d69c3bd830253cb5967d8c6e0777026ce8eaca31 /libvxi11client/perlbits/perlglue.c | |
parent | ee9fe4fa6339dc1e49a4d484f9f03d4091c6aa90 (diff) |
The perl interface is cleaner at least. Need to work out how to get the call back working
Diffstat (limited to 'libvxi11client/perlbits/perlglue.c')
-rw-r--r-- | libvxi11client/perlbits/perlglue.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libvxi11client/perlbits/perlglue.c b/libvxi11client/perlbits/perlglue.c new file mode 100644 index 0000000..e870477 --- /dev/null +++ b/libvxi11client/perlbits/perlglue.c @@ -0,0 +1,23 @@ +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +#include "ppport.h" + +#include "perlglue.h" + +#define INTERRUPTHANDLE "libvxi11client" + +extern int vxi11_enable_srq(bool enable, char* handle, void (*callback)(void)); + +static SV* perlcallback = NULL; + +static void interruptcallback(void) { + //PUSHMARK(SP); + call_sv(perlcallback, G_DISCARD | G_NOARGS); +} + +int glue_enable_srq(bool enable, SV* callback) { + perlcallback = callback; + return vxi11_enable_srq(enable, INTERRUPTHANDLE, interruptcallback); +} |