@@ -80,6 +80,22 @@ static storage_spec get_storage_spec(PARROT_INTERP, STable *st) {
80
80
return spec ;
81
81
}
82
82
83
+ /* Serializes the data. */
84
+ static void serialize (PARROT_INTERP , STable * st , void * data , SerializationWriter * writer ) {
85
+ KnowHOWREPRBody * body = (KnowHOWREPRBody * )data ;
86
+ writer -> write_str (interp , writer , body -> name );
87
+ writer -> write_ref (interp , writer , body -> attributes );
88
+ writer -> write_ref (interp , writer , body -> methods );
89
+ }
90
+
91
+ /* Deserializes the data. */
92
+ static void deserialize (PARROT_INTERP , STable * st , void * data , SerializationReader * reader ) {
93
+ KnowHOWREPRBody * body = (KnowHOWREPRBody * )data ;
94
+ body -> name = reader -> read_str (interp , reader );
95
+ body -> attributes = reader -> read_ref (interp , reader );
96
+ body -> methods = reader -> read_ref (interp , reader );
97
+ }
98
+
83
99
/* Initializes the KnowHOWREPR representation. */
84
100
REPROps * KnowHOWREPR_initialize (PARROT_INTERP ) {
85
101
/* Allocate and populate the representation function table. */
@@ -91,5 +107,7 @@ REPROps * KnowHOWREPR_initialize(PARROT_INTERP) {
91
107
this_repr -> gc_mark = gc_mark ;
92
108
this_repr -> gc_free = gc_free ;
93
109
this_repr -> get_storage_spec = get_storage_spec ;
110
+ this_repr -> serialize = serialize ;
111
+ this_repr -> deserialize = deserialize ;
94
112
return this_repr ;
95
113
}
0 commit comments