mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +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;
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user