** Search the upvalues of the function 'fs' for one ** with the given 'name'. */
| 333 | ** with the given 'name'. |
| 334 | */ |
| 335 | static int searchupvalue (FuncState *fs, TString *name) { |
| 336 | int i; |
| 337 | Upvaldesc *up = fs->f->upvalues; |
| 338 | for (i = 0; i < fs->nups; i++) { |
| 339 | if (eqstr(up[i].name, name)) return i; |
| 340 | } |
| 341 | return -1; /* not found */ |
| 342 | } |
| 343 | |
| 344 | |
| 345 | static Upvaldesc *allocupvalue (FuncState *fs) { |