Whoops! Pasted in a incorrect version of the _read_records() patch.
The "offset" needs to be an intermediate variable
------ _read_records() in TableExtension.pyx ------
 def _read_records(self, hsize_t start, hsize_t nrecords, object recarr):
   cdef long buflen, offset
   cdef void *rbuf
   cdef int ret

   # Correct the number of records to read, if needed
   if (start + nrecords) > self.totalrecords:
     nrecords = self.totalrecords - start

   # Get the pointer to the buffer data area
   buflen = NA_getBufferPtrAndSize(recarr._data, 1, &rbuf)
   # SS 2006-0506 - Correct the offset
offset = recarr._byteoffset
      rbuf = <void *>(<char *>rbuf + offset)
   # Read the records from disk
   Py_BEGIN_ALLOW_THREADS
   ret = H5TBOread_records(self.dataset_id, self.type_id, start,
                           nrecords, rbuf)
   Py_END_ALLOW_THREADS
   if ret < 0:
     raise HDF5ExtError("Problems reading records.")

   # Convert some HDF5 types to Numarray after reading.
   self._convertTypes(recarr, nrecords, 1)

   return nrecords
-----------------



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to