mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-18 16:25:05 +08:00
labels: make lookup_labels and is_extern take a const char *
Whenever we can, we should constipate our arguments... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
8753425472
commit
785ffb95da
@ -147,7 +147,7 @@ static void out_symdef(char *name, int32_t segment, int64_t offset,
|
||||
* given label name. Creates a new one, if it isn't found, and if
|
||||
* `create' is true.
|
||||
*/
|
||||
static union label *find_label(char *label, int create, int *created)
|
||||
static union label *find_label(const char *label, int create, int *created)
|
||||
{
|
||||
char *prev;
|
||||
int prevlen, len;
|
||||
@ -203,7 +203,7 @@ static union label *find_label(char *label, int create, int *created)
|
||||
return lfree++;
|
||||
}
|
||||
|
||||
bool lookup_label(char *label, int32_t *segment, int64_t *offset)
|
||||
bool lookup_label(const char *label, int32_t *segment, int64_t *offset)
|
||||
{
|
||||
union label *lptr;
|
||||
|
||||
@ -220,7 +220,7 @@ bool lookup_label(char *label, int32_t *segment, int64_t *offset)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_extern(char *label)
|
||||
bool is_extern(const char *label)
|
||||
{
|
||||
union label *lptr;
|
||||
|
||||
|
@ -43,8 +43,8 @@
|
||||
extern char lprefix[PREFIX_MAX];
|
||||
extern char lpostfix[PREFIX_MAX];
|
||||
|
||||
bool lookup_label(char *label, int32_t *segment, int64_t *offset);
|
||||
bool is_extern(char *label);
|
||||
bool lookup_label(const char *label, int32_t *segment, int64_t *offset);
|
||||
bool is_extern(const char *label);
|
||||
void define_label(char *label, int32_t segment, int64_t offset, char *special,
|
||||
bool is_norm, bool isextrn);
|
||||
void redefine_label(char *label, int32_t segment, int64_t offset, char *special,
|
||||
|
Loading…
Reference in New Issue
Block a user