Skip to content

6l: declare cpos() in l.h#140

Merged
staalmannen merged 1 commit into
mainfrom
claude/upgrade-ape-c-library-mmZGd
May 22, 2026
Merged

6l: declare cpos() in l.h#140
staalmannen merged 1 commit into
mainfrom
claude/upgrade-ape-c-library-mmZGd

Conversation

@staalmannen

Copy link
Copy Markdown
Owner

asmbelf() in asm.c uses cpos() to capture file offsets, but cpos() was only declared locally in dwarf.c. Add the declaration to l.h alongside cflush().

https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs

asmbelf() in asm.c uses cpos() to capture file offsets, but cpos()
was only declared locally in dwarf.c. Add the declaration to l.h
alongside cflush().

https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
@staalmannen staalmannen merged commit fc3c92d into main May 22, 2026
1 check passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the cpos function declaration to the sys/src/cmd/6l/l.h header file. A review comment suggests reordering the function declarations to maintain alphabetical order, specifically moving cpos after copyp.

Comment thread sys/src/cmd/6l/l.h
Comment on lines +372 to 374
vlong cpos(void);
void ckoff(Sym*, long);
Prog* copyp(Prog*);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The function declarations in this header are maintained in alphabetical order. To follow this convention, cpos should be placed after copyp and before cputime (since 'ck' < 'co' < 'cp').

void	ckoff(Sym*, long);
Prog*	copyp(Prog*);
vlong	cpos(void);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants