mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-21 17:56:31 +00:00
Rename webserver.args to webserver.arg_size
Reserve args() for a potential future object with accessor and iterator
This commit is contained in:
parent
de1ac64bd4
commit
0f0ff85cdd
@ -21,7 +21,7 @@ extern int w_webserver_content_flush(bvm *vm);
|
|||||||
extern int w_webserver_content_stop(bvm *vm);
|
extern int w_webserver_content_stop(bvm *vm);
|
||||||
extern int w_webserver_content_button(bvm *vm);
|
extern int w_webserver_content_button(bvm *vm);
|
||||||
|
|
||||||
extern int w_webserver_args(bvm *vm);
|
extern int w_webserver_argsize(bvm *vm);
|
||||||
extern int w_webserver_arg(bvm *vm);
|
extern int w_webserver_arg(bvm *vm);
|
||||||
extern int w_webserver_has_arg(bvm *vm);
|
extern int w_webserver_has_arg(bvm *vm);
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ be_native_module_attr_table(webserver) {
|
|||||||
be_native_module_function("content_stop", w_webserver_content_stop),
|
be_native_module_function("content_stop", w_webserver_content_stop),
|
||||||
be_native_module_function("content_button", w_webserver_content_button),
|
be_native_module_function("content_button", w_webserver_content_button),
|
||||||
|
|
||||||
be_native_module_function("args", w_webserver_args),
|
be_native_module_function("arg_size", w_webserver_argsize),
|
||||||
be_native_module_function("arg", w_webserver_arg),
|
be_native_module_function("arg", w_webserver_arg),
|
||||||
be_native_module_function("has_arg", w_webserver_has_arg),
|
be_native_module_function("has_arg", w_webserver_has_arg),
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ module webserver (scope: global) {
|
|||||||
content_stop, func(w_webserver_content_stop)
|
content_stop, func(w_webserver_content_stop)
|
||||||
content_button, func(w_webserver_content_button)
|
content_button, func(w_webserver_content_button)
|
||||||
|
|
||||||
args, func(w_webserver_args)
|
arg_size, func(w_webserver_argsize)
|
||||||
arg, func(w_webserver_arg)
|
arg, func(w_webserver_arg)
|
||||||
has_arg, func(w_webserver_has_arg)
|
has_arg, func(w_webserver_has_arg)
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,6 @@ extern const bcstring be_const_str_format;
|
|||||||
extern const bcstring be_const_str_pi;
|
extern const bcstring be_const_str_pi;
|
||||||
extern const bcstring be_const_str_RC522_RST;
|
extern const bcstring be_const_str_RC522_RST;
|
||||||
extern const bcstring be_const_str_SSPI_MAX31865_CS1;
|
extern const bcstring be_const_str_SSPI_MAX31865_CS1;
|
||||||
extern const bcstring be_const_str_args;
|
|
||||||
extern const bcstring be_const_str_tostring;
|
extern const bcstring be_const_str_tostring;
|
||||||
extern const bcstring be_const_str_try_rule;
|
extern const bcstring be_const_str_try_rule;
|
||||||
extern const bcstring be_const_str_SM16716_DAT;
|
extern const bcstring be_const_str_SM16716_DAT;
|
||||||
@ -205,6 +204,7 @@ extern const bcstring be_const_str_opt_eq;
|
|||||||
extern const bcstring be_const_str_PZEM016_RX;
|
extern const bcstring be_const_str_PZEM016_RX;
|
||||||
extern const bcstring be_const_str_SYMBOL_LEFT;
|
extern const bcstring be_const_str_SYMBOL_LEFT;
|
||||||
extern const bcstring be_const_str_SYMBOL_SETTINGS;
|
extern const bcstring be_const_str_SYMBOL_SETTINGS;
|
||||||
|
extern const bcstring be_const_str_arg_size;
|
||||||
extern const bcstring be_const_str_BL0940_RX;
|
extern const bcstring be_const_str_BL0940_RX;
|
||||||
extern const bcstring be_const_str_cb_dispatch;
|
extern const bcstring be_const_str_cb_dispatch;
|
||||||
extern const bcstring be_const_str_cmd;
|
extern const bcstring be_const_str_cmd;
|
||||||
|
@ -93,8 +93,7 @@ be_define_const_str(classof, "classof", 1796577762u, 0, 7, &be_const_str_format)
|
|||||||
be_define_const_str(format, "format", 3114108242u, 0, 6, &be_const_str_pi);
|
be_define_const_str(format, "format", 3114108242u, 0, 6, &be_const_str_pi);
|
||||||
be_define_const_str(pi, "pi", 1213090802u, 0, 2, NULL);
|
be_define_const_str(pi, "pi", 1213090802u, 0, 2, NULL);
|
||||||
be_define_const_str(RC522_RST, "RC522_RST", 720511443u, 0, 9, NULL);
|
be_define_const_str(RC522_RST, "RC522_RST", 720511443u, 0, 9, NULL);
|
||||||
be_define_const_str(SSPI_MAX31865_CS1, "SSPI_MAX31865_CS1", 1256578724u, 0, 17, &be_const_str_args);
|
be_define_const_str(SSPI_MAX31865_CS1, "SSPI_MAX31865_CS1", 1256578724u, 0, 17, NULL);
|
||||||
be_define_const_str(args, "args", 2634721084u, 0, 4, NULL);
|
|
||||||
be_define_const_str(tostring, "tostring", 2299708645u, 0, 8, &be_const_str_try_rule);
|
be_define_const_str(tostring, "tostring", 2299708645u, 0, 8, &be_const_str_try_rule);
|
||||||
be_define_const_str(try_rule, "try_rule", 1986449405u, 0, 8, NULL);
|
be_define_const_str(try_rule, "try_rule", 1986449405u, 0, 8, NULL);
|
||||||
be_define_const_str(SM16716_DAT, "SM16716_DAT", 1905621806u, 0, 11, &be_const_str_SYMBOL_CALL);
|
be_define_const_str(SM16716_DAT, "SM16716_DAT", 1905621806u, 0, 11, &be_const_str_SYMBOL_CALL);
|
||||||
@ -205,6 +204,7 @@ be_define_const_str(opt_eq, "==", 2431966415u, 0, 2, &be_const_str_PZEM016_RX);
|
|||||||
be_define_const_str(PZEM016_RX, "PZEM016_RX", 1004012055u, 0, 10, &be_const_str_SYMBOL_LEFT);
|
be_define_const_str(PZEM016_RX, "PZEM016_RX", 1004012055u, 0, 10, &be_const_str_SYMBOL_LEFT);
|
||||||
be_define_const_str(SYMBOL_LEFT, "SYMBOL_LEFT", 1563517575u, 0, 11, &be_const_str_SYMBOL_SETTINGS);
|
be_define_const_str(SYMBOL_LEFT, "SYMBOL_LEFT", 1563517575u, 0, 11, &be_const_str_SYMBOL_SETTINGS);
|
||||||
be_define_const_str(SYMBOL_SETTINGS, "SYMBOL_SETTINGS", 339656335u, 0, 15, NULL);
|
be_define_const_str(SYMBOL_SETTINGS, "SYMBOL_SETTINGS", 339656335u, 0, 15, NULL);
|
||||||
|
be_define_const_str(arg_size, "arg_size", 3310243257u, 0, 8, NULL);
|
||||||
be_define_const_str(BL0940_RX, "BL0940_RX", 2908993179u, 0, 9, &be_const_str_cb_dispatch);
|
be_define_const_str(BL0940_RX, "BL0940_RX", 2908993179u, 0, 9, &be_const_str_cb_dispatch);
|
||||||
be_define_const_str(cb_dispatch, "cb_dispatch", 1741510499u, 0, 11, &be_const_str_cmd);
|
be_define_const_str(cb_dispatch, "cb_dispatch", 1741510499u, 0, 11, &be_const_str_cmd);
|
||||||
be_define_const_str(cmd, "cmd", 4136785899u, 0, 3, &be_const_str_get_tasmota);
|
be_define_const_str(cmd, "cmd", 4136785899u, 0, 3, &be_const_str_get_tasmota);
|
||||||
@ -679,7 +679,7 @@ static const bstring* const m_string_table[] = {
|
|||||||
(const bstring *)&be_const_str_INPUT_PULLUP,
|
(const bstring *)&be_const_str_INPUT_PULLUP,
|
||||||
(const bstring *)&be_const_str_opt_eq,
|
(const bstring *)&be_const_str_opt_eq,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
(const bstring *)&be_const_str_arg_size,
|
||||||
NULL,
|
NULL,
|
||||||
(const bstring *)&be_const_str_BL0940_RX,
|
(const bstring *)&be_const_str_BL0940_RX,
|
||||||
(const bstring *)&be_const_str_SYMBOL_OK,
|
(const bstring *)&be_const_str_SYMBOL_OK,
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
#include "be_constobj.h"
|
#include "be_constobj.h"
|
||||||
|
|
||||||
static be_define_const_map_slots(m_libwebserver_map) {
|
static be_define_const_map_slots(m_libwebserver_map) {
|
||||||
{ be_const_key(on, 12), be_const_func(w_webserver_on) },
|
{ be_const_key(on, 5), be_const_func(w_webserver_on) },
|
||||||
{ be_const_key(state, 6), be_const_func(w_webserver_state) },
|
{ be_const_key(state, 6), be_const_func(w_webserver_state) },
|
||||||
{ be_const_key(content_send_style, -1), be_const_func(w_webserver_content_send_style) },
|
{ be_const_key(content_flush, -1), be_const_func(w_webserver_content_flush) },
|
||||||
{ be_const_key(content_send, -1), be_const_func(w_webserver_content_send) },
|
{ be_const_key(content_send, -1), be_const_func(w_webserver_content_send) },
|
||||||
{ be_const_key(arg, -1), be_const_func(w_webserver_arg) },
|
{ be_const_key(arg, -1), be_const_func(w_webserver_arg) },
|
||||||
{ be_const_key(content_flush, -1), be_const_func(w_webserver_content_flush) },
|
{ be_const_key(has_arg, -1), be_const_func(w_webserver_has_arg) },
|
||||||
{ be_const_key(content_start, 5), be_const_func(w_webserver_content_start) },
|
{ be_const_key(content_start, 2), be_const_func(w_webserver_content_start) },
|
||||||
{ be_const_key(content_button, -1), be_const_func(w_webserver_content_button) },
|
{ be_const_key(content_button, -1), be_const_func(w_webserver_content_button) },
|
||||||
{ be_const_key(args, 2), be_const_func(w_webserver_args) },
|
{ be_const_key(content_send_style, -1), be_const_func(w_webserver_content_send_style) },
|
||||||
{ be_const_key(check_privileged_access, -1), be_const_func(w_webserver_check_privileged_access) },
|
{ be_const_key(check_privileged_access, 12), be_const_func(w_webserver_check_privileged_access) },
|
||||||
{ be_const_key(content_stop, -1), be_const_func(w_webserver_content_stop) },
|
{ be_const_key(content_stop, -1), be_const_func(w_webserver_content_stop) },
|
||||||
{ be_const_key(member, -1), be_const_func(w_webserver_member) },
|
{ be_const_key(member, -1), be_const_func(w_webserver_member) },
|
||||||
{ be_const_key(has_arg, -1), be_const_func(w_webserver_has_arg) },
|
{ be_const_key(arg_size, -1), be_const_func(w_webserver_argsize) },
|
||||||
};
|
};
|
||||||
|
|
||||||
static be_define_const_map(
|
static be_define_const_map(
|
||||||
|
@ -800,7 +800,7 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
be_raise(vm, kTypeError, nullptr);
|
be_raise(vm, "attribute_error", "module 'lvgl' has no such attribute");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************************************\
|
/*********************************************************************************************\
|
||||||
|
@ -59,7 +59,7 @@ extern "C" {
|
|||||||
be_return(vm);
|
be_return(vm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
be_raise(vm, kTypeError, nullptr);
|
be_raise(vm, "attribute_error", "module 'webserver' has no such attribute");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,8 +201,8 @@ extern "C" {
|
|||||||
// Berry: `webserver.args() -> int`
|
// Berry: `webserver.args() -> int`
|
||||||
//
|
//
|
||||||
// Returns the number of arguments
|
// Returns the number of arguments
|
||||||
int32_t w_webserver_args(struct bvm *vm);
|
int32_t w_webserver_argsize(struct bvm *vm);
|
||||||
int32_t w_webserver_args(struct bvm *vm) {
|
int32_t w_webserver_argsize(struct bvm *vm) {
|
||||||
be_pushint(vm, Webserver->args());
|
be_pushint(vm, Webserver->args());
|
||||||
be_return(vm);
|
be_return(vm);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user