mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Make and use a vector variant of luax_convobj
Which also prevents accessing the zeroeth element of an empty vector
This commit is contained in:
@@ -389,11 +389,13 @@ int luax_convobj(lua_State *L, int idx, const char *module, const char *function
|
||||
* @param module The module in the love table.
|
||||
* @param function The function in the module.
|
||||
**/
|
||||
int luax_convobj(lua_State *L, int idxs[], int n, const char *module, const char *function);
|
||||
int luax_convobj(lua_State *L, const int idxs[], int n, const char *module, const char *function);
|
||||
int luax_convobj(lua_State *L, const std::vector<int>& idxs, const char *module, const char *function);
|
||||
|
||||
// pcall versions of the above
|
||||
int luax_pconvobj(lua_State *L, int idx, const char *module, const char *function);
|
||||
int luax_pconvobj(lua_State *L, int idxs[], int n, const char *module, const char *function);
|
||||
int luax_pconvobj(lua_State *L, const int idxs[], int n, const char *module, const char *function);
|
||||
int luax_pconvobj(lua_State *L, const std::vector<int>& idxs, const char *module, const char *function);
|
||||
|
||||
/**
|
||||
* 'Insist' that a table 'k' exists in the table at idx. Insistence involves that the
|
||||
|
||||
Reference in New Issue
Block a user