** Clear API string cache. (Entries cannot be empty, so fill them with ** a non-collectable string.) */
| 120 | ** a non-collectable string.) |
| 121 | */ |
| 122 | void luaS_clearcache (global_State *g) { |
| 123 | int i, j; |
| 124 | for (i = 0; i < STRCACHE_N; i++) |
| 125 | for (j = 0; j < STRCACHE_M; j++) { |
| 126 | if (iswhite(g->strcache[i][j])) /* will entry be collected? */ |
| 127 | g->strcache[i][j] = g->memerrmsg; /* replace it with something fixed */ |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | |
| 132 | /* |