more type simplifier tests
[hiphop-php.git] / hphp / neo / ulist.h
blob23f192bc72aec7353905e3371494fe33e91c1f78
1 /*
2 * Neotonic ClearSilver Templating System
4 * This code is made available under the terms of the
5 * Neotonic ClearSilver License.
6 * http://www.neotonic.com/clearsilver/license.hdf
8 * Copyright (C) 2001 by Brandon Long
9 */
11 #ifndef incl_HPHP_ULIST_H_
12 #define incl_HPHP_ULIST_H_ 1
14 #include "hphp/neo/neo_err.h"
16 typedef struct _ulist
18 int flags;
19 void **items;
20 int num;
21 int max;
22 } ULIST;
24 #define ULIST_INTEGER (1<<0)
25 #define ULIST_FREE (1<<1)
26 #define ULIST_COPY (1<<2)
28 NEOERR * uListInit(ULIST **ul, int size, int flags);
29 int uListLength (ULIST *ul);
30 NEOERR * uListAppend (ULIST *ul, void *data);
31 NEOERR * uListGet (ULIST *ul, int x, void **data);
32 NEOERR * uListSort (ULIST *ul, int (*compareFunc)(const void*, const void*));
33 NEOERR * uListDestroy (ULIST **ul, int flags);
34 NEOERR * uListDestroyFunc (ULIST **ul, void (*destroyFunc)(void *));
36 #endif /* incl_HPHP_ULIST_H_ */