Use CollTransfer where possible.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5225 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -503,11 +503,9 @@ static void SymCheckUndefined (SymEntry* S)
|
||||
}
|
||||
}
|
||||
if (S->Flags & SF_REFERENCED) {
|
||||
unsigned I;
|
||||
/* Mark as referenced and move the line info */
|
||||
Sym->Flags |= SF_REFERENCED;
|
||||
for (I = 0; I < CollCount (&S->RefLines); ++I) {
|
||||
CollAppend (&Sym->RefLines, CollAtUnchecked (&S->RefLines, I));
|
||||
}
|
||||
CollTransfer (&Sym->RefLines, &S->RefLines);
|
||||
CollDeleteAll (&S->RefLines);
|
||||
}
|
||||
|
||||
@@ -564,9 +562,11 @@ void SymCheck (void)
|
||||
*/
|
||||
if (S->Flags & SF_GLOBAL) {
|
||||
if (S->Flags & SF_DEFINED) {
|
||||
SymExportFromGlobal (S);
|
||||
} else {
|
||||
SymImportFromGlobal (S);
|
||||
printf ("ExportFromGlobal: %s\n", SB_GetConstBuf (GetSymName (S)));
|
||||
SymExportFromGlobal (S);
|
||||
} else {
|
||||
printf ("ImportFromGlobal: %s\n", SB_GetConstBuf (GetSymName (S)));
|
||||
SymImportFromGlobal (S);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user