Changeset 3458 for trunk/src/kash/nodes.c.pat
- Timestamp:
- Sep 14, 2020, 11:46:32 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/nodes.c.pat
r2391 r3458 47 47 #include "shinstance.h" 48 48 49 #ifndef KASH_SEPARATE_PARSER_ALLOCATOR 49 50 50 51 size_t funcblocksize; /* size of structures in function */ … … 62 63 STATIC char *nodesavestr(char *); 63 64 65 #endif /* !KASH_SEPARATE_PARSER_ALLOCATOR */ 64 66 65 67 … … 73 75 union node *n; 74 76 { 77 #ifdef KASH_SEPARATE_PARSER_ALLOCATOR 78 if (n != NULL) { 79 unsigned refs = pstackretain(n->pblock); 80 TRACE2((psh, "copyfunc: %p - %u refs\n", n->pblock, refs)); K_NOREF(refs); 81 } 82 return n; 83 #else 75 84 if (n == NULL) 76 85 return NULL; … … 81 90 funcstring = (char *) funcblock + funcblocksize; 82 91 return copynode(n); 92 #endif 83 93 } 84 94 85 95 #ifndef KASH_SEPARATE_PARSER_ALLOCATOR 86 96 87 97 STATIC void … … 154 164 } 155 165 166 #endif /* !KASH_SEPARATE_PARSER_ALLOCATOR */ 156 167 157 168 … … 165 176 union node *n; 166 177 { 178 #ifdef KASH_SEPARATE_PARSER_ALLOCATOR 179 if (n) 180 pstackrelease(psh, n->pblock, "freefunc"); 181 #else 167 182 if (n) 168 183 ckfree(psh, n); 184 #endif 169 185 }
Note:
See TracChangeset
for help on using the changeset viewer.