diff options
author | daniel <danieruru@gmail.com> | 2013-01-18 02:40:49 +0900 |
---|---|---|
committer | daniel <danieruru@gmail.com> | 2013-01-18 02:40:49 +0900 |
commit | 425b461dfe9f330f7bb35061c6cce4c78fbcc5aa (patch) | |
tree | 64194fdb9a610258db222d1f34651317a77db243 /libvxi11client/perlbits | |
parent | 3bcf349f108248fc3ca705ff1fc8b56923e8bfa4 (diff) |
add a lazy way to call write
Diffstat (limited to 'libvxi11client/perlbits')
-rw-r--r-- | libvxi11client/perlbits/Client.xs | 2 | ||||
-rw-r--r-- | libvxi11client/perlbits/VXI11-Client.t | 2 | ||||
-rw-r--r-- | libvxi11client/perlbits/perlglue.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/libvxi11client/perlbits/Client.xs b/libvxi11client/perlbits/Client.xs index fc6194a..339444f 100644 --- a/libvxi11client/perlbits/Client.xs +++ b/libvxi11client/perlbits/Client.xs @@ -174,7 +174,7 @@ int write(context,data, len, waitlock, end) VXI11::Client context char * data - unsigned int len + int len bool waitlock bool end CODE: diff --git a/libvxi11client/perlbits/VXI11-Client.t b/libvxi11client/perlbits/VXI11-Client.t index 691a6bb..f2e74b1 100644 --- a/libvxi11client/perlbits/VXI11-Client.t +++ b/libvxi11client/perlbits/VXI11-Client.t @@ -21,7 +21,7 @@ BEGIN { use_ok('VXI11::Client') }; my $instr = &VXI11::Client::open("roi", 0); is($instr->lock(0), 1, "Lock"); -is($instr->write("*IDN?", 6, 0, 0), 6, "Write"); +ok($instr->write("*IDN?", -1, 0, 0) > 0, "Write"); ok($instr->readstatusbyte(0) >= 0 , "Read status byte"); is($instr->create_intr_chan(), 1, "Create intr channel"); is($instr->enable_srq(1, "myhandle"), 1, "Enable interrupts"); diff --git a/libvxi11client/perlbits/perlglue.c b/libvxi11client/perlbits/perlglue.c index 3225ca0..902f915 100644 --- a/libvxi11client/perlbits/perlglue.c +++ b/libvxi11client/perlbits/perlglue.c @@ -19,8 +19,8 @@ static void freeevent(Event* event) { static void freelast() { if (lastevent != NULL) { freeevent(lastevent); + lastevent = NULL; } - lastevent = NULL; } static void interruptcallback(char* handle) { |