Skip to content

Commit 205debf

Browse files
author
Nicholas Reed
committed
add fedex_plus/express memory cleanup function; SCL git f5d0cc5
1 parent 6b0ac10 commit 205debf

File tree

20 files changed

+181
-6
lines changed

20 files changed

+181
-6
lines changed

include/express/dict.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ extern SCL_EXPRESS_EXPORT char DICT_type; /**< set as a side-effect of DICT loo
9898
/***********************/
9999

100100
extern SCL_EXPRESS_EXPORT void DICTinitialize PROTO( ( void ) );
101+
extern SCL_EXPRESS_EXPORT void DICTcleanup PROTO( ( void ) );
101102
extern SCL_EXPRESS_EXPORT int DICTdefine PROTO( ( Dictionary, char *, Generic, Symbol *, char ) );
102103
extern SCL_EXPRESS_EXPORT int DICT_define PROTO( ( Dictionary, char *, Generic, Symbol *, char ) );
103104
extern SCL_EXPRESS_EXPORT void DICTundefine PROTO( ( Dictionary, char * ) );

include/express/error.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,12 @@ static_inline void ERRORflush_messages( void ) {
172172

173173
extern SCL_EXPRESS_EXPORT void ERRORinitialize PROTO( ( void ) );
174174
extern SCL_EXPRESS_EXPORT void ERRORinitialize_after_LIST PROTO( ( void ) );
175+
extern SCL_EXPRESS_EXPORT void ERRORcleanup PROTO( ( void ) );
175176
extern SCL_EXPRESS_EXPORT void ERRORnospace PROTO( ( void ) );
176177
extern SCL_EXPRESS_EXPORT void ERRORabort PROTO( ( int ) );
177178
extern SCL_EXPRESS_EXPORT Error ERRORcreate PROTO( ( char *, Severity ) );
178179
extern SCL_EXPRESS_EXPORT void ERRORreport PROTO( ( Error, ... ) );
180+
extern SCL_EXPRESS_EXPORT void ERRORdestroy PROTO( ( Error ) );
179181

180182
struct Symbol_; /* mention Symbol to avoid warning on following line */
181183
extern SCL_EXPRESS_EXPORT void ERRORreport_with_symbol PROTO( ( Error, struct Symbol_ *, ... ) );

include/express/expr.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ extern SCL_EXPRESS_EXPORT Expression BIN_EXPcreate PROTO( ( Op_Code, Expressio
268268
extern SCL_EXPRESS_EXPORT Expression TERN_EXPcreate PROTO( ( Op_Code, Expression, Expression, Expression ) );
269269
extern SCL_EXPRESS_EXPORT Expression QUERYcreate PROTO( ( Symbol *, Expression ) );
270270
extern SCL_EXPRESS_EXPORT void EXPinitialize PROTO( ( void ) );
271+
extern SCL_EXPRESS_EXPORT void EXPcleanup PROTO( ( void ) );
271272
extern SCL_EXPRESS_EXPORT Type EXPtype PROTO( ( Expression, struct Scope_ * ) );
272273
extern SCL_EXPRESS_EXPORT int EXPget_integer_value PROTO( ( Expression ) );
273274

include/express/express.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,10 @@ extern SCL_EXPRESS_EXPORT char * KW_XOR;
248248
/***********************/
249249

250250
extern SCL_EXPRESS_EXPORT Express EXPRESScreate PROTO( ( void ) );
251+
extern SCL_EXPRESS_EXPORT void EXPRESSdestroy PROTO( ( Express ) );
251252
extern SCL_EXPRESS_EXPORT void EXPRESSparse PROTO( ( Express, FILE *, char * ) );
252253
extern SCL_EXPRESS_EXPORT void EXPRESSinitialize PROTO( ( void ) );
254+
extern SCL_EXPRESS_EXPORT void EXPRESScleanup PROTO( ( void ) );
253255
extern SCL_EXPRESS_EXPORT void EXPRESSresolve PROTO( ( Express ) );
254256
extern SCL_EXPRESS_EXPORT char * EXPRESSversion PROTO( ( void ) );
255257
extern SCL_EXPRESS_EXPORT int EXPRESS_fail PROTO( ( Express ) );

include/express/linklist.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ extern SCL_EXPRESS_EXPORT Linked_List LINK__l; /* for LISTcreate_with macro - u
131131
/***********************/
132132

133133
extern SCL_EXPRESS_EXPORT void LISTinitialize PROTO( ( void ) );
134+
extern SCL_EXPRESS_EXPORT void LISTcleanup PROTO( ( void ) );
134135
extern SCL_EXPRESS_EXPORT Linked_List LISTcreate PROTO( ( void ) );
135136
extern SCL_EXPRESS_EXPORT Linked_List LISTcopy PROTO( ( Linked_List ) );
136137
extern SCL_EXPRESS_EXPORT Generic LISTadd_first PROTO( ( Linked_List, Generic ) );

include/express/object.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ extern SCL_EXPRESS_EXPORT struct Object * OBJ;
9999
/***********************/
100100

101101
extern SCL_EXPRESS_EXPORT void OBJinitialize PROTO( ( void ) );
102+
extern SCL_EXPRESS_EXPORT void OBJcleanup PROTO( ( void ) );
102103
extern SCL_EXPRESS_EXPORT void OBJcreate PROTO( ( char, struct Symbol_ * ( * )( Generic ), char *, int ) );
103104
extern SCL_EXPRESS_EXPORT Symbol * UNK_get_symbol PROTO( ( Generic x ) );
104105

include/express/resolve.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ extern SCL_EXPRESS_EXPORT Error ERROR_ambiguous_group;
7272
/***********************/
7373

7474
extern SCL_EXPRESS_EXPORT void RESOLVEinitialize PROTO( ( void ) );
75+
extern SCL_EXPRESS_EXPORT void RESOLVEcleanup PROTO( ( void ) );
7576
extern SCL_EXPRESS_EXPORT void SCOPEresolve_expressions_statements PROTO( ( Scope ) );
7677
extern SCL_EXPRESS_EXPORT void SCOPEresolve_subsupers PROTO( ( Scope ) );
7778
extern SCL_EXPRESS_EXPORT void SCOPEresolve_types PROTO( ( Scope ) );

include/express/schema.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ extern SCL_EXPRESS_EXPORT Generic SCHEMAfind PROTO( ( Schema, char * name, int
155155
extern SCL_EXPRESS_EXPORT Scope SCOPEcreate PROTO( ( char ) );
156156
extern SCL_EXPRESS_EXPORT Scope SCOPEcreate_tiny PROTO( ( char ) );
157157
extern SCL_EXPRESS_EXPORT Scope SCOPEcreate_nostab PROTO( ( char ) );
158+
extern SCL_EXPRESS_EXPORT void SCOPEdestroy PROTO( ( Scope ) );
158159
extern SCL_EXPRESS_EXPORT Linked_List SCHEMAget_entities_use PROTO( ( Scope ) );
159160
extern SCL_EXPRESS_EXPORT Linked_List SCHEMAget_entities_ref PROTO( ( Scope ) );
160161

include/express/type.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ extern SCL_EXPRESS_EXPORT Type TYPEcreate_name PROTO( ( struct Symbol_ * ) );
309309
extern SCL_EXPRESS_EXPORT Type TYPEcreate_nostab PROTO( ( struct Symbol_ *, Scope, char ) );
310310
extern SCL_EXPRESS_EXPORT TypeBody TYPEBODYcreate PROTO( ( enum type_enum ) );
311311
extern SCL_EXPRESS_EXPORT void TYPEinitialize PROTO( ( void ) );
312+
extern SCL_EXPRESS_EXPORT void TYPEcleanup PROTO( ( void ) );
312313

313314
extern SCL_EXPRESS_EXPORT bool TYPEinherits_from PROTO( ( Type, enum type_enum ) );
314315
extern SCL_EXPRESS_EXPORT Type TYPEget_nonaggregate_base_type PROTO( ( Type ) );

src/express/dict.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ void DICTinitialize( void ) {
6565
"Redeclaration of %s. Previous declaration was on line %d in file %s.", SEVERITY_ERROR );
6666
}
6767

68+
/** Clean up the Dictionary module */
69+
void DICTcleanup( void ) {
70+
ERRORdestroy( ERROR_duplicate_decl );
71+
ERRORdestroy( ERROR_duplicate_decl_diff_file );
72+
}
73+
6874
/**
6975
* Define anything in a dictionary. Generates an
7076
* error directly if there is a duplicate value.

0 commit comments

Comments
 (0)