Skip to content

Commit

Permalink
gc: protect more objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed May 30, 2013
1 parent 45b99ae commit b1997ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/objmodel.c
Expand Up @@ -256,13 +256,15 @@ static inline long potion_obj_find_ivar(Potion *P, PN self, PN ivar) {

/// implements OP_GETPATH
PN potion_obj_get(Potion *P, PN cl, PN self, PN ivar) {
self = potion_fwd(self);
long i = potion_obj_find_ivar(P, self, ivar);
if (i >= 0)
return ((struct PNObject *)self)->ivars[i];
return PN_NIL;
}
/// implements OP_SETPATH
PN potion_obj_set(Potion *P, PN cl, PN self, PN ivar, PN value) {
self = potion_fwd(self);
long i = potion_obj_find_ivar(P, self, ivar);
if (i >= 0) {
((struct PNObject *)self)->ivars[i] = value;
Expand Down

0 comments on commit b1997ad

Please sign in to comment.