Skip to content

llgo:type C => llgo:cdecl - #59

Merged
xushiwei merged 1 commit into
goplus:mainfrom
xushiwei:t
Oct 24, 2026
Merged

xushiwei merged 1 commit into
goplus:mainfrom
xushiwei:t

Conversation

@xushiwei

Copy link
Copy Markdown
Member

No description provided.

@fennoai fennoai 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.

Review: llgo:type C => llgo:cdecl

Mechanical rename of the llgo directive //llgo:type C (and the inconsistently-spaced // llgo:type C) to //llgo:cdecl across the C/C++/Python FFI bindings, plus removal of the standalone test programs under c/bdwgc/_test/.

Verified:

  • Rename is complete and consistent — no llgo:type occurrences remain anywhere in the repo; all 64 new //llgo:cdecl directives use the correct no-space Go directive form.
  • Each directive sits immediately above its declaration with no intervening blank line. c/libuv/async.go correctly inserts a bare // separator so the directive attaches to type AsyncCb — this also activates a directive that was previously inert due to the leading space.
  • Several prior // llgo:type C lines carried a space and so were not valid Go directives; normalizing them to //llgo:cdecl is a genuine correctness improvement, not just cosmetic.
  • Deleting c/bdwgc/_test/ leaves no dangling references; c/bdwgc/bdwgc.go is self-contained.
  • gofmt is clean on the changed files.

No correctness, performance, or security issues found. The actual ABI/calling-convention behavior depends on the llgo compiler mapping //llgo:cdecl to the former //llgo:type C semantics, which lives in the compiler and is out of scope for this diff.

Optional, out of scope: the repo still uses the spaced // llgo:link ... form in many places; a follow-up could normalize those to the no-space directive form for consistency.

Comment thread py/module.go

/*
// llgo:type C
//llgo:cdecl

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor / informational: these two directives (this line and line 34) are inside the /* ... */ block comment that spans lines 28-39, so the llgo compiler never sees them — the rename has no functional effect here (same as the old // llgo:type C). Harmless, but worth knowing it's a documentation-only touch-up, not an active directive, until the block is uncommented.

@xushiwei
xushiwei merged commit d858355 into goplus:main Oct 24, 2026
5 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.

1 participant