Skip to content

Fix line number reporting in trace functions for function calls#348

Merged
blueloveTH merged 1 commit intopocketpy:mainfrom
lightovernight:fix-lineno
Mar 7, 2025
Merged

Fix line number reporting in trace functions for function calls#348
blueloveTH merged 1 commit intopocketpy:mainfrom
lightovernight:fix-lineno

Conversation

@lightovernight
Copy link
Contributor

When a trace function is set using settrace, we can access the current file name and line number through py_Frame_sourceloc. However, during function calls, the line number is returned as 0. This PR fixes this issue to return the correct line number.

@blueloveTH
Copy link
Collaborator

This is awesome.

@blueloveTH blueloveTH merged commit 1d73bdf into pocketpy:main Mar 7, 2025
10 of 11 checks passed
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