mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
r12812@catbus: nickm | 2007-05-19 16:17:36 -0400
Fix compilation with -O0; add unit tests for swap and shuffle. svn:r10223
This commit is contained in:
@@ -78,9 +78,9 @@ extern INLINE void smartlist_set(smartlist_t *sl, int idx, void *val) {
|
||||
#define smartlist_set(sl, idx, val) ((sl)->list[idx] = (val))
|
||||
#endif
|
||||
|
||||
void smartlist_swap(smartlist_t *sl, int idx1, int idx2);
|
||||
// void smartlist_swap(smartlist_t *sl, int idx1, int idx2);
|
||||
/**DOCDOC*/
|
||||
extern INLINE void smartlist_swap(smartlist_t *sl, int idx1, int idx2)
|
||||
static INLINE void smartlist_swap(smartlist_t *sl, int idx1, int idx2)
|
||||
{
|
||||
if (idx1 != idx2) {
|
||||
void *elt = smartlist_get(sl, idx1);
|
||||
|
||||
Reference in New Issue
Block a user