1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-05 21:29:03 +00:00

Call StrBuf destructors

git-svn-id: svn://svn.cc65.org/cc65/trunk@1415 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2002-09-29 21:15:02 +00:00
parent e880ac6059
commit 2df5db1f04

View File

@ -136,12 +136,16 @@ static void StringPragma (StrBuf* B, void (*Func) (const char*))
{
StrBuf S;
/* We expect a string here */
if (SB_GetString (B, &S)) {
/* Call the given function with the string argument */
Func (SB_GetConstBuf (&S));
} else {
Error ("String literal expected");
}
/* Call the string buf destructor */
DoneStrBuf (&S);
}
@ -171,7 +175,10 @@ static void SegNamePragma (StrBuf* B, segment_t Seg)
} else {
Error ("String literal expected");
}
}
/* Call the string buf destructor */
DoneStrBuf (&S);
}
@ -345,6 +352,9 @@ static void ParsePragma (void)
if (SB_Peek (&B) != '\0') {
Error ("Unexpected input following pragma directive");
}
/* Release the StrBuf */
DoneStrBuf (&B);
}