comparison help2html/uintarray.c @ 9:60b08b68c750

Switch to static inline as an expedient build fix. Should probably set this up with working C99 inline but for the moment I don't have the energy.
author David A. Holland
date Mon, 30 May 2022 23:56:45 -0400
parents 13d2b8934445
children
comparison
equal deleted inserted replaced
8:ec2b657edf13 9:60b08b68c750
31 31
32 /* 32 /*
33 * I wish there were a way to check that these were the same as the 33 * I wish there were a way to check that these were the same as the
34 * inline versions, but apparently allowing such things to diverge is 34 * inline versions, but apparently allowing such things to diverge is
35 * a feature of C99. Bleh. 35 * a feature of C99. Bleh.
36 *
37 * Update: it all broke anyway, so I've switched to static inline as
38 * an expedient. Thus, at least for the time being, we don't need the
39 * extra copies.
36 */ 40 */
37 41
42 #if 0
38 unsigned uintarray_num(const struct uintarray *a) { 43 unsigned uintarray_num(const struct uintarray *a) {
39 return a->num; 44 return a->num;
40 } 45 }
41 46
42 unsigned uintarray_get(const struct uintarray *a, unsigned ix) { 47 unsigned uintarray_get(const struct uintarray *a, unsigned ix) {
46 51
47 void uintarray_set(struct uintarray *a, unsigned ix, unsigned val) { 52 void uintarray_set(struct uintarray *a, unsigned ix, unsigned val) {
48 assert(ix < a->num); 53 assert(ix < a->num);
49 a->v[ix] = val; 54 a->v[ix] = val;
50 } 55 }
56 #endif
51 57
52 //////////////////////////////////////////////////////////// 58 ////////////////////////////////////////////////////////////
53 59
54 void uintarray_add(struct uintarray *a, unsigned val) { 60 void uintarray_add(struct uintarray *a, unsigned val) {
55 unsigned ix; 61 unsigned ix;