Skip to content

Commit 03db0cb

Browse files
committed
Add a pointer to the STable where a REPR can optionally hang any type-specific data, so we can refactor away from 'REPR instances'.
1 parent 395da2f commit 03db0cb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/6model/sixmodelobject.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ typedef struct {
1515
} SixModelObjectCommonalities;
1616

1717
typedef struct {
18-
PMC *class_handle; /* Class handle */
18+
PMC *class_handle; /* Class handle */
1919
STRING *att_name; /* Name of the attribute. */
2020
} ParrotVtableHandlerSlot;
2121

@@ -24,6 +24,9 @@ typedef struct {
2424
typedef struct {
2525
/* The representation. */
2626
PMC *REPR;
27+
28+
/* Any data specific to this type that the REPR wants to keep. */
29+
void *REPR_data;
2730

2831
/* The meta-object. */
2932
PMC *HOW;
@@ -67,10 +70,8 @@ typedef struct {
6770
* of Parrot v-table functions. */
6871
PMC **parrot_vtable_mapping;
6972

70-
/**
71-
* Parrot-specific set of v-table to object method mappings */
73+
/* Parrot-specific set of v-table to object method mappings. */
7274
ParrotVtableHandlerSlot *parrot_vtable_handler_mapping;
73-
7475
} STable;
7576

7677
/* A representation is what controls the layout of an object and storage of

0 commit comments

Comments
 (0)