mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Make symbol ref in patch symbols constant
This commit is contained in:
@@ -45,7 +45,7 @@ struct Patch {
|
|||||||
|
|
||||||
struct PatchSymbol {
|
struct PatchSymbol {
|
||||||
uint32_t ID;
|
uint32_t ID;
|
||||||
struct sSymbol *pSymbol;
|
struct sSymbol const *pSymbol;
|
||||||
struct PatchSymbol *pNext;
|
struct PatchSymbol *pNext;
|
||||||
struct PatchSymbol *pBucketNext; /* next symbol in hash table bucket */
|
struct PatchSymbol *pBucketNext; /* next symbol in hash table bucket */
|
||||||
};
|
};
|
||||||
@@ -186,7 +186,7 @@ static void fputlong(uint32_t i, FILE *f)
|
|||||||
/*
|
/*
|
||||||
* Write a NULL-terminated string to a file
|
* Write a NULL-terminated string to a file
|
||||||
*/
|
*/
|
||||||
static void fputstring(char *s, FILE *f)
|
static void fputstring(char const *s, FILE *f)
|
||||||
{
|
{
|
||||||
while (*s)
|
while (*s)
|
||||||
fputc(*s++, f);
|
fputc(*s++, f);
|
||||||
@@ -259,7 +259,7 @@ static void writesection(struct Section *pSect, FILE *f)
|
|||||||
/*
|
/*
|
||||||
* Write a symbol to a file
|
* Write a symbol to a file
|
||||||
*/
|
*/
|
||||||
static void writesymbol(struct sSymbol *pSym, FILE *f)
|
static void writesymbol(struct sSymbol const *pSym, FILE *f)
|
||||||
{
|
{
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
uint32_t offset;
|
uint32_t offset;
|
||||||
@@ -538,12 +538,12 @@ void out_CheckErrors(void)
|
|||||||
struct PatchSymbol *pSym = pPatchSymbols;
|
struct PatchSymbol *pSym = pPatchSymbols;
|
||||||
|
|
||||||
while (pSym) {
|
while (pSym) {
|
||||||
struct sSymbol *pSymbol = pSym->pSymbol;
|
struct sSymbol const *pSymbol = pSym->pSymbol;
|
||||||
|
|
||||||
if (!(pSymbol->nType & SYMF_DEFINED)
|
if (!(pSymbol->nType & SYMF_DEFINED)
|
||||||
&& pSymbol->nType & SYMF_LOCAL) {
|
&& pSymbol->nType & SYMF_LOCAL) {
|
||||||
char *name = pSymbol->tzName;
|
char const *name = pSymbol->tzName;
|
||||||
char *localPtr = strchr(name, '.');
|
char const *localPtr = strchr(name, '.');
|
||||||
|
|
||||||
if (localPtr)
|
if (localPtr)
|
||||||
name = localPtr;
|
name = localPtr;
|
||||||
|
|||||||
Reference in New Issue
Block a user