diff options
author | David Young <dyoung@hdfgroup.org> | 2022-03-10 16:15:57 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2022-03-10 16:15:57 (GMT) |
commit | e8bcb24e3fafc3dabc2a039c0e2be40b8e3bb1bb (patch) | |
tree | b6339c6f753d784cd1e3dd5ddbbe2f8ecc168db0 /src | |
parent | 9e87536a295e5006cad2b38f5c416774bff80f34 (diff) | |
download | hdf5-e8bcb24e3fafc3dabc2a039c0e2be40b8e3bb1bb.zip hdf5-e8bcb24e3fafc3dabc2a039c0e2be40b8e3bb1bb.tar.gz hdf5-e8bcb24e3fafc3dabc2a039c0e2be40b8e3bb1bb.tar.bz2 |
NFCI: write some comments.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Tnative.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/H5Tnative.c b/src/H5Tnative.c index 4567fe5..44c6d45 100644 --- a/src/H5Tnative.c +++ b/src/H5Tnative.c @@ -1122,12 +1122,22 @@ H5T__init_native_int(void) } UINT_FAST64; } alignments_t; + /* Describe a C99 type, `type`, and tell where to write its + * H5T_t identifier and alignment. Tables of these descriptions + * drive the initialization of `H5T_t`s. + */ typedef struct { + /* Pointer to the global variable that receives the + * alignment of `type`: + */ size_t * alignmentp; - size_t alignment; + size_t alignment; // natural alignment of `type` + /* Pointer to the global variable that receives the + * identifier for `type`'s H5T_t: + */ hid_t * hidp; - size_t size; - H5T_atomic_t atomic; + size_t size; // sizeof(`type`) + H5T_atomic_t atomic; // `type` facts such as signedness } native_int_t; typedef struct { @@ -1195,6 +1205,12 @@ H5T__init_native_int(void) for (i = 0; i < NELMTS(table_table); i++) { const native_int_t *table = table_table[i].table; size_t nelmts = table_table[i].nelmts; + + /* For each C99 type in `table`, create its H5T_t, + * register a hid_t for the H5T_t, and record the type's + * alignment and hid_t in the variables named by the + * table. + */ for (j = 0; j < nelmts; j++) { H5T_t *dt; |