| 1860 | |
| 1861 | |
| 1862 | static lu_byte getglobalattribute (LexState *ls, lu_byte df) { |
| 1863 | lu_byte kind = getvarattribute(ls, df); |
| 1864 | switch (kind) { |
| 1865 | case RDKTOCLOSE: |
| 1866 | luaK_semerror(ls, "global variables cannot be to-be-closed"); |
| 1867 | return kind; /* to avoid warnings */ |
| 1868 | case RDKCONST: |
| 1869 | return GDKCONST; /* adjust kind for global variable */ |
| 1870 | default: |
| 1871 | return kind; |
| 1872 | } |
| 1873 | } |
| 1874 | |
| 1875 | |
| 1876 | static void checkglobal (LexState *ls, TString *varname, int line) { |
no test coverage detected