Mercurial > urweb
comparison include/urweb/types_cpp.h @ 2240:88cc0f44c940
Rename C functions and remove functors nested inside modules.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Sun, 19 Jul 2015 19:03:11 -0700 |
parents | 2f7ed04332a0 |
children | c275bbc41194 |
comparison
equal
deleted
inserted
replaced
2239:f70a91f7810d | 2240:88cc0f44c940 |
---|---|
121 | 121 |
122 // Caching | 122 // Caching |
123 | 123 |
124 #include "uthash.h" | 124 #include "uthash.h" |
125 | 125 |
126 typedef struct CacheValue { | 126 typedef struct uw_sqlcache_CacheValue { |
127 char *result; | 127 char *result; |
128 char *output; | 128 char *output; |
129 } CacheValue; | 129 } uw_sqlcache_CacheValue; |
130 | 130 |
131 typedef struct CacheEntry { | 131 typedef struct uw_sqlcache_CacheEntry { |
132 char *key; | 132 char *key; |
133 void *value; | 133 void *value; |
134 time_t timeValid; | 134 time_t timeValid; |
135 struct CacheEntry *prev; | 135 struct uw_sqlcache_CacheEntry *prev; |
136 struct CacheEntry *next; | 136 struct uw_sqlcache_CacheEntry *next; |
137 UT_hash_handle hh; | 137 UT_hash_handle hh; |
138 } CacheEntry; | 138 } uw_sqlcache_CacheEntry; |
139 | 139 |
140 typedef struct CacheList { | 140 typedef struct uw_sqlcache_CacheList { |
141 CacheEntry *first; | 141 uw_sqlcache_CacheEntry *first; |
142 CacheEntry *last; | 142 uw_sqlcache_CacheEntry *last; |
143 int size; | 143 int size; |
144 } CacheList; | 144 } uw_sqlcache_CacheList; |
145 | 145 |
146 typedef struct Cache { | 146 typedef struct uw_sqlcache_Cache { |
147 CacheEntry *table; | 147 uw_sqlcache_CacheEntry *table; |
148 time_t timeInvalid; | 148 time_t timeInvalid; |
149 CacheList *lru; | 149 uw_sqlcache_CacheList *lru; |
150 int height; | 150 int height; |
151 } Cache; | 151 } uw_sqlcache_Cache; |
152 | 152 |
153 #endif | 153 #endif |