** Search the upvalues of the function 'fs' for one ** with the given 'name'. */
| 358 | ** with the given 'name'. |
| 359 | */ |
| 360 | static int searchupvalue (FuncState *fs, TString *name) { |
| 361 | int i; |
| 362 | Upvaldesc *up = fs->f->upvalues; |
| 363 | for (i = 0; i < fs->nups; i++) { |
| 364 | if (eqstr(up[i].name, name)) return i; |
| 365 | } |
| 366 | return -1; /* not found */ |
| 367 | } |
| 368 | |
| 369 | |
| 370 | static Upvaldesc *allocupvalue (FuncState *fs) { |