Fix typo of be_set_ctype_func_hanlder (#23147)

This commit is contained in:
s-hadinger 2025-03-13 17:49:28 +01:00 committed by GitHub
parent 9b4eb64caa
commit 6486ba3b26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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;
} }

View File

@ -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*)

View File

@ -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 */
} }
``` ```

View File

@ -364,7 +364,7 @@ void BerryInit(void) {
be_set_obs_micros(berry.vm, (bmicrosfnct)&micros); be_set_obs_micros(berry.vm, (bmicrosfnct)&micros);
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;