Skip to content

Commit

Permalink
Fix extension pointers in cnex
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlarryf committed Apr 23, 2024
1 parent a041415 commit b95b503
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions exec/cnex/extension.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ void cell_set_bytes(struct Ne_Cell *cell, const unsigned char *value, int size)

void *cell_get_pointer(const struct Ne_Cell *cell)
{
cell_ensureOther((Cell*)cell);
return (void*)((Cell*)cell)->other;
cell_ensureObject((Cell*)cell);
return ((Cell*)((Cell*)cell)->object->ptr)->other;
}

void cell_set_pointer(struct Ne_Cell *cell, void *p)
{
cell_ensureOther((Cell*)cell);
((Cell*)cell)->other = p;
cell_ensureObject((Cell*)cell);
((Cell*)cell)->object->ptr = cell_createOtherCell(p);
}

int cell_get_array_size(const struct Ne_Cell *cell)
Expand Down

0 comments on commit b95b503

Please sign in to comment.