Use the Span structure also for scopes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5115 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -186,3 +186,27 @@ const char* GetObjFileName (const ObjData* O)
|
||||
|
||||
|
||||
|
||||
struct Section* GetObjSection (ObjData* O, unsigned Id)
|
||||
/* Get a section from an object file checking for a valid index */
|
||||
{
|
||||
if (Id >= CollCount (&O->Sections)) {
|
||||
Error ("Invalid section index (%u) in module `%s'",
|
||||
Id, GetObjFileName (O));
|
||||
}
|
||||
return CollAtUnchecked (&O->Sections, Id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct Scope* GetObjScope (ObjData* O, unsigned Id)
|
||||
/* Get a scope from an object file checking for a valid index */
|
||||
{
|
||||
if (Id >= CollCount (&O->Scopes)) {
|
||||
Error ("Invalid scope index (%u) in module `%s'",
|
||||
Id, GetObjFileName (O));
|
||||
}
|
||||
return CollAtUnchecked (&O->Scopes, Id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user