Skip to content

Commit 81b046a

Browse files
authored
Correct ordering of pixbuf metatable (#3700)
1 parent 2d9f082 commit 81b046a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

app/modules/pixbuf.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -680,10 +680,13 @@ static int pixbuf_tostring_lua(lua_State *L) {
680680
}
681681

682682
LROT_BEGIN(pixbuf_map, NULL, LROT_MASK_INDEX | LROT_MASK_EQ)
683-
LROT_TABENTRY ( __index, pixbuf_map )
684-
LROT_FUNCENTRY( __eq, pixbuf_eq_lua )
685-
683+
/* https://nodemcu.readthedocs.io/en/dev/lua53/#rotables notes:
684+
* "Some ordering limitations apply", namely that entries beginning
685+
* with '__' must be first and must be sorted.
686+
*/
686687
LROT_FUNCENTRY( __concat, pixbuf_concat_lua )
688+
LROT_FUNCENTRY( __eq, pixbuf_eq_lua )
689+
LROT_TABENTRY ( __index, pixbuf_map )
687690
LROT_FUNCENTRY( __tostring, pixbuf_tostring_lua )
688691

689692
LROT_FUNCENTRY( channels, pixbuf_channels_lua )

0 commit comments

Comments
 (0)