Skip to content

Commit 1464f94

Browse files
committed
Add version int to HDSLoc
This allows a future HDS wrapper library to be able to quickly work out which version to use for a given locator.
1 parent ba2ee4d commit 1464f94

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

dat1.h

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ typedef enum {
123123

124124
/* Private definition of the HDS locator struct */
125125
typedef struct LOC {
126+
int hds_version; /* Implementation version number. Always 5 at the moment. */
126127
void *pntr; /* Pointer to memory mapped data array [datMap only] */
127128
size_t bytesmapped; /* Number of bytes mapped into memory [datMap only] */
128129
size_t vectorized; /* if 0 not vectorized, else number of vectorized elements */

dat1AllocLoc.c

+2
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,7 @@ dat1AllocLoc( int * status ) {
101101
emsRep("dat1AllocLoc", "Could not allocate memory for HDS locator",
102102
status );
103103
}
104+
/* Force the implementation version into the struct */
105+
newloc->hds_version = 5;
104106
return newloc;
105107
}

0 commit comments

Comments
 (0)