mirror of
https://github.com/cc65/cc65.git
synced 2024-07-10 23:29:05 +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:
parent
e880ac6059
commit
2df5db1f04
@ -136,12 +136,16 @@ static void StringPragma (StrBuf* B, void (*Func) (const char*))
|
|||||||
{
|
{
|
||||||
StrBuf S;
|
StrBuf S;
|
||||||
|
|
||||||
|
/* We expect a string here */
|
||||||
if (SB_GetString (B, &S)) {
|
if (SB_GetString (B, &S)) {
|
||||||
/* Call the given function with the string argument */
|
/* Call the given function with the string argument */
|
||||||
Func (SB_GetConstBuf (&S));
|
Func (SB_GetConstBuf (&S));
|
||||||
} else {
|
} else {
|
||||||
Error ("String literal expected");
|
Error ("String literal expected");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Call the string buf destructor */
|
||||||
|
DoneStrBuf (&S);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -171,7 +175,10 @@ static void SegNamePragma (StrBuf* B, segment_t Seg)
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
Error ("String literal expected");
|
Error ("String literal expected");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Call the string buf destructor */
|
||||||
|
DoneStrBuf (&S);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -345,6 +352,9 @@ static void ParsePragma (void)
|
|||||||
if (SB_Peek (&B) != '\0') {
|
if (SB_Peek (&B) != '\0') {
|
||||||
Error ("Unexpected input following pragma directive");
|
Error ("Unexpected input following pragma directive");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Release the StrBuf */
|
||||||
|
DoneStrBuf (&B);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user