Skip to content

Fix arg.name → arg.arg_name in macros.j2 byref smart pointer wrapping#63

Open
elliejs wants to merge 1 commit into
CadQuery:masterfrom
elliejs:rename-arg-name-member
Open

Fix arg.name → arg.arg_name in macros.j2 byref smart pointer wrapping#63
elliejs wants to merge 1 commit into
CadQuery:masterfrom
elliejs:rename-arg-name-member

Conversation

@elliejs

@elliejs elliejs commented Jul 16, 2026

Copy link
Copy Markdown

Summary

  • init_outputs_byref macro (macros.j2:44) uses arg.name which doesn't
    exist on ArgInfo — the correct field is arg.arg_name (since 4338109)
  • Jinja2 silently renders the missing attribute as empty string, producing
    broken C++ (_ptr; _ptr = &;) instead of a template error
  • Affects all platforms — 377 broken declarations across 65 generated files

Line 44 of init_outputs_byref uses arg.name, but ArgInfo has no such
attribute — the field is arg.arg_name (introduced in 4338109). Jinja2
silently renders the missing attribute as empty string, producing
broken C++ like:

    SomeType _ptr; _ptr = &;

instead of:

    SomeType myArg_ptr; myArg_ptr = &myArg;

This causes compile failures in 65 generated files (377 instances).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@elliejs elliejs force-pushed the rename-arg-name-member branch from ff318bc to 499cd39 Compare July 16, 2026 06:13
@elliejs

elliejs commented Jul 16, 2026

Copy link
Copy Markdown
Author

force push was editing the commit to be clear that I am still using claude.

@adam-urbanczyk

Copy link
Copy Markdown
Member

Ok, that looks more manageable. Could you open a dummy PR to OCP to verify that it builds with this version?

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