@@ -182,7 +182,7 @@ static void get_stable_ref_info(PARROT_INTERP, SerializationWriter *writer,
182
182
}
183
183
184
184
/* Expands current target storage as needed. */
185
- void expand_storage_if_needed (PARROT_INTERP , SerializationWriter * writer , INTVAL need ) {
185
+ static void expand_storage_if_needed (PARROT_INTERP , SerializationWriter * writer , INTVAL need ) {
186
186
if (* (writer -> cur_write_offset ) + need > * (writer -> cur_write_limit )) {
187
187
* (writer -> cur_write_limit ) *= 2 ;
188
188
* (writer -> cur_write_buffer ) = (char * )mem_sys_realloc (* (writer -> cur_write_buffer ),
@@ -191,29 +191,29 @@ void expand_storage_if_needed(PARROT_INTERP, SerializationWriter *writer, INTVAL
191
191
}
192
192
193
193
/* Writing function for native integers. */
194
- void write_int_func (PARROT_INTERP , SerializationWriter * writer , INTVAL value ) {
194
+ static void write_int_func (PARROT_INTERP , SerializationWriter * writer , INTVAL value ) {
195
195
expand_storage_if_needed (interp , writer , 8 );
196
196
write_int64 (* (writer -> cur_write_buffer ), * (writer -> cur_write_offset ), value );
197
197
* (writer -> cur_write_offset ) += 8 ;
198
198
}
199
199
200
200
/* Writing function for native numbers. */
201
- void write_num_func (PARROT_INTERP , SerializationWriter * writer , FLOATVAL value ) {
201
+ static void write_num_func (PARROT_INTERP , SerializationWriter * writer , FLOATVAL value ) {
202
202
expand_storage_if_needed (interp , writer , 8 );
203
203
write_double (* (writer -> cur_write_buffer ), * (writer -> cur_write_offset ), value );
204
204
* (writer -> cur_write_offset ) += 8 ;
205
205
}
206
206
207
207
/* Writing function for native strings. */
208
- void write_str_func (PARROT_INTERP , SerializationWriter * writer , STRING * value ) {
208
+ static void write_str_func (PARROT_INTERP , SerializationWriter * writer , STRING * value ) {
209
209
Parrot_Int4 heap_loc = add_string_to_heap (interp , writer , value );
210
210
expand_storage_if_needed (interp , writer , 4 );
211
211
write_int32 (* (writer -> cur_write_buffer ), * (writer -> cur_write_offset ), heap_loc );
212
212
* (writer -> cur_write_offset ) += 4 ;
213
213
}
214
214
215
215
/* Writes an object reference. */
216
- void write_obj_ref (PARROT_INTERP , SerializationWriter * writer , PMC * ref ) {
216
+ static void write_obj_ref (PARROT_INTERP , SerializationWriter * writer , PMC * ref ) {
217
217
Parrot_Int4 sc_id , idx ;
218
218
219
219
if (PMC_IS_NULL (SC_PMC (ref ))) {
@@ -578,7 +578,7 @@ void write_ref_func(PARROT_INTERP, SerializationWriter *writer, PMC *ref) {
578
578
}
579
579
580
580
/* Writing function for references to STables. */
581
- void write_stable_ref_func (PARROT_INTERP , SerializationWriter * writer , STable * st ) {
581
+ static void write_stable_ref_func (PARROT_INTERP , SerializationWriter * writer , STable * st ) {
582
582
Parrot_Int4 sc_id , idx ;
583
583
get_stable_ref_info (interp , writer , st -> stable_pmc , & sc_id , & idx );
584
584
expand_storage_if_needed (interp , writer , 8 );
@@ -1111,15 +1111,15 @@ static PMC * lookup_stable(PARROT_INTERP, SerializationReader *reader, Parrot_In
1111
1111
}
1112
1112
1113
1113
/* Ensure that we aren't going to read off the end of the buffer. */
1114
- void assert_can_read (PARROT_INTERP , SerializationReader * reader , INTVAL amount ) {
1114
+ static void assert_can_read (PARROT_INTERP , SerializationReader * reader , INTVAL amount ) {
1115
1115
char * read_end = * (reader -> cur_read_buffer ) + * (reader -> cur_read_offset ) + amount ;
1116
1116
if (read_end > * (reader -> cur_read_end ))
1117
1117
Parrot_ex_throw_from_c_args (interp , NULL , EXCEPTION_INVALID_OPERATION ,
1118
1118
"Read past end of serialization data buffer" );
1119
1119
}
1120
1120
1121
1121
/* Reading function for native integers. */
1122
- INTVAL read_int_func (PARROT_INTERP , SerializationReader * reader ) {
1122
+ static INTVAL read_int_func (PARROT_INTERP , SerializationReader * reader ) {
1123
1123
INTVAL result ;
1124
1124
assert_can_read (interp , reader , 8 );
1125
1125
result = read_int64 (* (reader -> cur_read_buffer ), * (reader -> cur_read_offset ));
@@ -1128,7 +1128,7 @@ INTVAL read_int_func(PARROT_INTERP, SerializationReader *reader) {
1128
1128
}
1129
1129
1130
1130
/* Reading function for native numbers. */
1131
- FLOATVAL read_num_func (PARROT_INTERP , SerializationReader * reader ) {
1131
+ static FLOATVAL read_num_func (PARROT_INTERP , SerializationReader * reader ) {
1132
1132
FLOATVAL result ;
1133
1133
assert_can_read (interp , reader , 8 );
1134
1134
result = read_double (* (reader -> cur_read_buffer ), * (reader -> cur_read_offset ));
@@ -1137,7 +1137,7 @@ FLOATVAL read_num_func(PARROT_INTERP, SerializationReader *reader) {
1137
1137
}
1138
1138
1139
1139
/* Reading function for native strings. */
1140
- STRING * read_str_func (PARROT_INTERP , SerializationReader * reader ) {
1140
+ static STRING * read_str_func (PARROT_INTERP , SerializationReader * reader ) {
1141
1141
STRING * result ;
1142
1142
assert_can_read (interp , reader , 4 );
1143
1143
result = read_string_from_heap (interp , reader ,
@@ -1147,7 +1147,7 @@ STRING * read_str_func(PARROT_INTERP, SerializationReader *reader) {
1147
1147
}
1148
1148
1149
1149
/* Reads in and resolves an object references. */
1150
- PMC * read_obj_ref (PARROT_INTERP , SerializationReader * reader ) {
1150
+ static PMC * read_obj_ref (PARROT_INTERP , SerializationReader * reader ) {
1151
1151
Parrot_Int4 sc_id , idx ;
1152
1152
1153
1153
assert_can_read (interp , reader , 8 );
@@ -1237,7 +1237,7 @@ static PMC * read_hash_str_var(PARROT_INTERP, SerializationReader *reader) {
1237
1237
}
1238
1238
1239
1239
/* Reads in a code reference. */
1240
- PMC * read_code_ref (PARROT_INTERP , SerializationReader * reader ) {
1240
+ static PMC * read_code_ref (PARROT_INTERP , SerializationReader * reader ) {
1241
1241
Parrot_Int4 sc_id , idx ;
1242
1242
1243
1243
assert_can_read (interp , reader , 8 );
@@ -1297,7 +1297,7 @@ PMC * read_ref_func(PARROT_INTERP, SerializationReader *reader) {
1297
1297
}
1298
1298
1299
1299
/* Reading function for STable references. */
1300
- STable * read_stable_ref_func (PARROT_INTERP , SerializationReader * reader ) {
1300
+ static STable * read_stable_ref_func (PARROT_INTERP , SerializationReader * reader ) {
1301
1301
Parrot_Int4 sc_id , idx ;
1302
1302
1303
1303
assert_can_read (interp , reader , 8 );
@@ -1684,7 +1684,7 @@ static void deserialize_object(PARROT_INTERP, SerializationReader *reader, INTVA
1684
1684
}
1685
1685
1686
1686
/* Repossess an object or STable. */
1687
- void repossess (PARROT_INTERP , SerializationReader * reader , INTVAL i ) {
1687
+ static void repossess (PARROT_INTERP , SerializationReader * reader , INTVAL i ) {
1688
1688
/* Calculate location of table row. */
1689
1689
char * table_row = reader -> root .repos_table + i * REPOS_TABLE_ENTRY_SIZE ;
1690
1690
0 commit comments