This commit is contained in:
blueloveTH 2024-08-04 20:38:49 +08:00
parent 348bb2b7a5
commit 9c173fdada
2 changed files with 7 additions and 3 deletions

View File

@ -202,7 +202,7 @@ void VM__dtor(VM* self) {
// destroy all objects // destroy all objects
ManagedHeap__dtor(&self->heap); ManagedHeap__dtor(&self->heap);
// clear frames // clear frames
// ... while(self->top_frame) VM__pop_frame(self);
NameDict__dtor(&self->modules); NameDict__dtor(&self->modules);
c11__foreach(py_TypeInfo, &self->types, ti) py_TypeInfo__dtor(ti); c11__foreach(py_TypeInfo, &self->types, ti) py_TypeInfo__dtor(ti);
c11_vector__dtor(&self->types); c11_vector__dtor(&self->types);

View File

@ -1,7 +1,11 @@
class A: class A:
def __init__(self, a, b): def __init__(self, a, __b):
self.a = a self.a = a
self.b = b self.__b = __b
@property
def b(self):
return self.__b
def add(self): def add(self):
return self.a + self.b return self.a + self.b