39 #undef MEMPTR_SEQ_OPEN
40 #undef MEMPTR_SEQ_CLOSE
43 #undef MEMPTR_GET_DIFF
44 #undef MEMPTR_DATA_COMPARE
57 #undef READ_OBJECT_KEY
60 #define MemPtr MemSeqRef
63 #define MEMPTR_SEQ_OPEN( context, memArea, offset, length, async, memPtr )\
65 memSeqOpen(context, memArea, offset, length, async, &(memPtr) ))
67 #define MEMPTR_SEQ_CLOSE( context, memArea, memPtr ) \
70 #define MEMPTR_OPEN( seqMemPtr, memPtr ) \
71 CHECK_MEM_ERR(memSeqOpenClone( seqMemPtr, &(memPtr) ))
73 #define MEMPTR_CLOSE( memPtr ) memSeqClose( memPtr )
75 #define MEMPTR_GET_DIFF( memPtr1, memPtr2, i32 ) \
78 memSeqReadPos( memPtr1, &(pos1) ); \
79 memSeqReadPos( memPtr2, &(pos2) ); \
83 #define MEMPTR_DATA_COMPARE( ui8Ptr, memPtr, length, equal ) \
84 CHECK_MEM_ERR(memSeqCompContig( ui8Ptr, memPtr, length, &(equal) ))
86 #define MEMPTR_READ( srcMemPtr, destUi8Ptr, numbytes ) \
89 CHECK_MEM_ERR(memSeqRead( srcMemPtr, destUi8Ptr, numbytes, &dummy )); \
92 #define MEMPTR_WRITE( srcUi8Ptr, destMemPtr, numbytes ) \
95 CHECK_MEM_ERR(memSeqWrite( srcUi8Ptr, destMemPtr, numbytes, &dummy )); \
98 #define MEMPTR_COPY( srcMemPtr, destMemPtr, numbytes ) \
101 CHECK_MEM_ERR(memSeqCopy( srcMemPtr, destMemPtr, numbytes, &dummy )); \
104 #define SET_POS_REL( memPtr, offset ) \
105 CHECK_MEM_ERR(memSeqSetPosRel( memPtr, offset ))
107 #define SET_POS_ABS( memPtr, memPos ) \
108 CHECK_MEM_ERR(memSeqSetPosAbs( memPtr, memPos ))
110 #define GET_POS( memPtr, memPos ) \
111 memSeqReadPos( memPtr, &(memPos) )
113 #define READ_UINT8( memPtr, ui8 ) \
114 CHECK_MEM_ERR(memSeqReadByte( memPtr, &(ui8) ))
116 #define READ_UINT16( memPtr, ui16 ) readUInt16Seq( memPtr, &(ui16) )
117 #define READ_UINT32( memPtr, ui32 ) readUInt32Seq( memPtr, &(ui32) )
118 #define GET_UINT8( memPtr, ui8 ) getUInt8Seq( memPtr, &(ui8) )
119 #define GET_UINT16( memPtr, ui16 ) getUInt16Seq( memPtr, &(ui16) )
120 #define GET_UINT32( memPtr, ui32 ) getUInt32Seq( memPtr, &(ui32) )
122 #define READ_OBJECT_KEY( memPtr, objKey, valid ) \
123 readObjectKeySeq( memPtr, &(objKey), &(valid) )
Defines memory access utils to work with contiguous memory.