tmetsch/platform-python-lsf-api — pull request #4 by decandia50 (2013-01-02 19:01:13+00:00)
Title: Bug fix for lsb_queueinfo()

- The LSF API docs state that calling lsb_queueinfo with queues=NULL and
numQueues=0 returns an array containing all queueInfoEnt structs and
numQueues will be set to the size of the array.
- The LSF API docs state that calling lsb_queueinfo with queues=NULL and
numQueues=1 returns a queueInfoEnt struct of the default queue
- Change the typemap of char ** to allow for NULL by passing in Py_None
- Add the ability for lsb_queueinfo to return an array of queueInfoEnt
struct.
- Without this patch the SWIG generation casts the pointer to
the array from lsb_queueinfo to a single struct.

- Example Code:
-------------
from pythonlsf import lsf
lsf.lsb_init('myapp')
queue_names = None
num_queues = lsf.new_intp()
lsf.intp_assign(num_queues, 0)
queue_data = lsf.lsb_queueinfo(queue_names, num_queues, None, None, 0)
all_queues = lsf.queueInfoEntArray_frompointer(queue_data)
for i in range(0,lsf.intp_value(num_queues)):
print(all_queues[i].queue)