mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
Fix typo of be_set_ctype_func_hanlder (#23147)
This commit is contained in:
parent
9b4eb64caa
commit
6486ba3b26
@ -405,7 +405,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
bvm *vm = be_vm_new(); /* create a virtual machine instance */
|
bvm *vm = be_vm_new(); /* create a virtual machine instance */
|
||||||
be_set_ctype_func_hanlder(vm, be_call_ctype_func);
|
be_set_ctype_func_handler(vm, be_call_ctype_func);
|
||||||
res = analysis_args(vm, argc, argv);
|
res = analysis_args(vm, argc, argv);
|
||||||
be_vm_delete(vm); /* free all objects and vm */
|
be_vm_delete(vm); /* free all objects and vm */
|
||||||
return res;
|
return res;
|
||||||
|
@ -1408,7 +1408,7 @@ BERRY_API void be_set_obs_micros(bvm *vm, bmicrosfnct micros)
|
|||||||
vm->microsfnct = micros;
|
vm->microsfnct = micros;
|
||||||
}
|
}
|
||||||
|
|
||||||
BERRY_API void be_set_ctype_func_hanlder(bvm *vm, bctypefunc handler)
|
BERRY_API void be_set_ctype_func_handler(bvm *vm, bctypefunc handler)
|
||||||
{
|
{
|
||||||
vm->ctypefunc = handler;
|
vm->ctypefunc = handler;
|
||||||
}
|
}
|
||||||
|
@ -2168,14 +2168,14 @@ BERRY_API void be_set_obs_micros(bvm *vm, bmicrosfnct micros);
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fn void be_set_ctype_func_hanlder(bvm*, bctypefunc)
|
* @fn void be_set_ctype_func_handler(bvm*, bctypefunc)
|
||||||
* @note Observability hook
|
* @note Observability hook
|
||||||
* @brief (???)
|
* @brief (???)
|
||||||
*
|
*
|
||||||
* @param vm virtual machine instance
|
* @param vm virtual machine instance
|
||||||
* @param handler
|
* @param handler
|
||||||
*/
|
*/
|
||||||
BERRY_API void be_set_ctype_func_hanlder(bvm *vm, bctypefunc handler);
|
BERRY_API void be_set_ctype_func_handler(bvm *vm, bctypefunc handler);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fn bctypefunc be_get_ctype_func_hanlder(bvm*)
|
* @fn bctypefunc be_get_ctype_func_hanlder(bvm*)
|
||||||
|
@ -171,7 +171,7 @@ You need to register the ctype function handler at the launch of the Berry VM:
|
|||||||
void berry_launch(boid)
|
void berry_launch(boid)
|
||||||
{
|
{
|
||||||
bvm *vm = be_vm_new(); /* Construct a VM */
|
bvm *vm = be_vm_new(); /* Construct a VM */
|
||||||
be_set_ctype_func_hanlder(berry.vm, be_call_ctype_func); /* register the ctype function handler */
|
be_set_ctype_func_handler(berry.vm, be_call_ctype_func); /* register the ctype function handler */
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -364,7 +364,7 @@ void BerryInit(void) {
|
|||||||
be_set_obs_micros(berry.vm, (bmicrosfnct)µs);
|
be_set_obs_micros(berry.vm, (bmicrosfnct)µs);
|
||||||
comp_set_named_gbl(berry.vm); /* Enable named globals in Berry compiler */
|
comp_set_named_gbl(berry.vm); /* Enable named globals in Berry compiler */
|
||||||
comp_set_strict(berry.vm); /* Enable strict mode in Berry compiler, equivalent of `import strict` */
|
comp_set_strict(berry.vm); /* Enable strict mode in Berry compiler, equivalent of `import strict` */
|
||||||
be_set_ctype_func_hanlder(berry.vm, be_call_ctype_func);
|
be_set_ctype_func_handler(berry.vm, be_call_ctype_func);
|
||||||
|
|
||||||
if (UsePSRAM()) { // if PSRAM is available, raise the max size to 512kb
|
if (UsePSRAM()) { // if PSRAM is available, raise the max size to 512kb
|
||||||
berry.vm->bytesmaxsize = 512 * 1024;
|
berry.vm->bytesmaxsize = 512 * 1024;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user