Skip to content

cgo: fix int-size adaptation and add LIT tests#1847

Open
zhouguangyuan0718 wants to merge 1 commit intoxgo-dev:mainfrom
zhouguangyuan0718:main-0504
Open

cgo: fix int-size adaptation and add LIT tests#1847
zhouguangyuan0718 wants to merge 1 commit intoxgo-dev:mainfrom
zhouguangyuan0718:main-0504

Conversation

@zhouguangyuan0718
Copy link
Copy Markdown
Contributor

Summary

  • expose and reuse Builder.FitIntSize for slice construction, unsafe.Slice, GoStringN, and GoBytes
  • fix cgo helper calls that require platform-sized int arguments
  • add LITTEST coverage for cgo basic calls, C files, defer paths, macros, and Python bindings

Testing

  • not run locally

@zhouguangyuan0718 zhouguangyuan0718 force-pushed the main-0504 branch 5 times, most recently from fd22e56 to 0594ff9 Compare May 5, 2026 09:33
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

- expose and reuse Builder.FitIntSize when lowering slice lengths, unsafe.Slice, GoStringN, and GoBytes so cgo helpers receive platform-sized int arguments
- convert cgobasic, cgocfiles, cgodefer, cgomacro, and cgopython checks to source-embedded LITTEST expectations
- drop the old out.ll golden files replaced by inline CHECK directives

Signed-off-by: ZhouGuangyuan <zhouguangyuan.xian@gmail.com>
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