mirror of https://github.com/arendst/Tasmota.git
Berry fix typo
This commit is contained in:
parent
f10c7f06bf
commit
6b0fbf0798
|
@ -46,14 +46,14 @@ bvalue* be_indexof(bvm *vm, int idx)
|
|||
return vm->top + idx;
|
||||
}
|
||||
|
||||
BERRY_API void be_newcomobj(bvm *vm, void *data, bntvfunc destory)
|
||||
BERRY_API void be_newcomobj(bvm *vm, void *data, bntvfunc destroy)
|
||||
{
|
||||
bcommomobj *obj;
|
||||
bgcobject *gco = be_gcnew(vm, BE_COMOBJ, bcommomobj);
|
||||
if ((obj = cast_comobj(gco)) != NULL) {
|
||||
bvalue* top = be_incrtop(vm);
|
||||
obj->data = data;
|
||||
obj->destory = destory;
|
||||
obj->destroy = destroy;
|
||||
var_setobj(top, BE_COMOBJ, obj);
|
||||
}
|
||||
}
|
||||
|
@ -62,8 +62,8 @@ void be_commonobj_delete(bvm *vm, bgcobject *obj)
|
|||
{
|
||||
bcommomobj *co = cast_comobj(obj);
|
||||
if (co) {
|
||||
if (co->destory && co->data) {
|
||||
be_pushntvfunction(vm, co->destory);
|
||||
if (co->destroy && co->data) {
|
||||
be_pushntvfunction(vm, co->destroy);
|
||||
be_pushcomptr(vm, co->data);
|
||||
be_call(vm, 1);
|
||||
be_pop(vm, 2);
|
||||
|
|
|
@ -191,7 +191,7 @@ struct bntvclos {
|
|||
typedef struct {
|
||||
bcommon_header;
|
||||
void *data;
|
||||
bntvfunc destory;
|
||||
bntvfunc destroy;
|
||||
} bcommomobj;
|
||||
|
||||
typedef const char* (*breader)(void*, size_t*);
|
||||
|
|
|
@ -499,7 +499,7 @@ BERRY_API bbool be_pushiter(bvm *vm, int index);
|
|||
BERRY_API void be_newlist(bvm *vm);
|
||||
BERRY_API void be_newmap(bvm *vm);
|
||||
BERRY_API void be_newmodule(bvm *vm);
|
||||
BERRY_API void be_newcomobj(bvm *vm, void *data, bntvfunc destory);
|
||||
BERRY_API void be_newcomobj(bvm *vm, void *data, bntvfunc destroy);
|
||||
BERRY_API void be_newobject(bvm *vm, const char *name);
|
||||
BERRY_API bbool be_copy(bvm *vm, int index);
|
||||
BERRY_API bbool be_setname(bvm *vm, int index, const char *name);
|
||||
|
|
Loading…
Reference in New Issue