summaryrefslogtreecommitdiff
path: root/libvxi11client/perlbits/Client.xs
diff options
context:
space:
mode:
Diffstat (limited to 'libvxi11client/perlbits/Client.xs')
-rw-r--r--libvxi11client/perlbits/Client.xs26
1 files changed, 12 insertions, 14 deletions
diff --git a/libvxi11client/perlbits/Client.xs b/libvxi11client/perlbits/Client.xs
index b09ee0a..e26190b 100644
--- a/libvxi11client/perlbits/Client.xs
+++ b/libvxi11client/perlbits/Client.xs
@@ -131,27 +131,25 @@ vxi_read(context, OUTLIST bytesread, OUTLIST buffer, bufferlen, waitlock, termch
bool waitlock
bool termchrset
char termchr
- unsigned int* reason
+ unsigned int reason
CODE:
- buffer = malloc(bufferlen + 1);
- bytesread = vxi11_read(context, buffer, bufferlen, waitlock, termchrset, termchr, reason);
+ buffer = calloc(bufferlen + 1, 1);
+ bytesread = vxi11_read(context, buffer, bufferlen, waitlock, termchrset, termchr, &reason);
void
-vxi_readstatusbyte(context, waitforlock, OUTLIST error, OUTLIST statusbyte)
+vxi_readstatusbyte(context, OUTLIST error, OUTLIST statusbyte, waitforlock)
VXI11::Client context
+ int error
+ int statusbyte
bool waitforlock
- int* error
- int* statusbyte
CODE:
+ error = 0;
+ statusbyte = 0;
int ret = vxi11_readstatusbyte(context, waitforlock);
- if(ret > 0){
- *statusbyte = ret & 0xff;
- *error = 0;
- }
- else {
- *statusbyte = 0;
- *error = ret;
- }
+ if(ret > 0)
+ statusbyte = ret & 0xff;
+ else
+ error = ret;
int
vxi_remote(context, waitforlock)