| 177 | } |
| 178 | |
| 179 | static bool tpt_scratch(tpt_context *c) { |
| 180 | cbm_pinned_tree_t *t = c->tree; |
| 181 | t->root_path = tpt_alloc(c, TPT_PATH_CAP, 1); |
| 182 | t->path_scratch = tpt_alloc(c, TPT_PATH_CAP, 1); |
| 183 | t->name_scratch = tpt_alloc(c, TPT_PATH_CAP, 1); |
| 184 | t->parent_path = tpt_alloc(c, TPT_PATH_CAP, 1); |
| 185 | t->io_scratch = tpt_alloc(c, TPT_CHUNK, 1); |
| 186 | t->security_scratch = tpt_alloc(c, TPT_SECURITY_CAP, 1); |
| 187 | #ifdef _WIN32 |
| 188 | t->enumeration_scratch = tpt_alloc(c, TPT_CHUNK, 1); |
| 189 | t->wide_path = tpt_alloc(c, TPT_PATH_CAP + 8, sizeof(wchar_t)); |
| 190 | t->wide_parent = tpt_alloc(c, TPT_PATH_CAP + 8, sizeof(wchar_t)); |
| 191 | t->wide_root = tpt_alloc(c, TPT_PATH_CAP + 8, sizeof(wchar_t)); |
| 192 | #endif |
| 193 | return tpt_poll(c); |
| 194 | } |
| 195 | |
| 196 | bool tpt_plan(tpt_context *c, const cbm_pinned_tree_options_t *o, |
| 197 | const cbm_git_tree_inventory_t *inventory) { |