Skip to content
Snippets Groups Projects
Commit 81352acd5b36 authored by jfp's avatar jfp
Browse files

Temporary, dont't check IOSB status if is zero

parent a39600d0b52c
Branches
No related tags found
No related merge requests found
......@@ -41,6 +41,10 @@
[type ItemList_Type, object ItemListObject] :
def __init__(self, unsigned short code=0, value=None, int dtype=noType,
unsigned short length=0, unsigned int flags=0):
if value is True and dtype == noType:
dtype = booleanType
if isinstance(value, str):
value = value.encode("iso-8859-15")
if dtype == noType and isinstance(value, bytes):
dtype = stringType
if dtype == noType and value is None:
......@@ -56,7 +60,10 @@
if dtype == signedLongByValueType and value is None:
raise error('signedLongByValue: missing value')
if dtype == booleanType:
pass
if value is None:
value = True
elif value is not True:
raise error("boolean value should be True or None (same as True)")
elif dtype == lkiDefListType:
if value is not None:
raise error("Should not specified a value with lkiDefListType")
......@@ -306,10 +313,8 @@
cdef LKIDEF* lkiptr = NULL
for i from 0 <= i < itmcard:
itm = itmlst[i]
if itm.value is None: # output argument
if itm.dtype == booleanType:
pass
elif itm.dtype == signedByteType:
if itm.value is None: # output argument, can't be boolean type
if itm.dtype == signedByteType:
val = int((<char *>pile3.ile3_ps_bufaddr)[0])
elif itm.dtype == unsignedByteType:
val = int((<unsigned char *>pile3.ile3_ps_bufaddr)[0])
......
......@@ -420,6 +420,7 @@
handler.handler.buflen - 1024 - 4)
checkStatus(s)
s = (<unsigned short *>(handler.handler.inadr.va_range_ps_start_va))[0]
if s != 0:
checkStatus(s)
cdef char* buf = <char *>(handler.handler.inadr.va_range_ps_start_va) + 4
cdef unsigned short* retlenPtr = <unsigned short *>(buf - 2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment