Skip to content

Inline Argument.memcpy_if_needed - #314

Merged
avalentino merged 1 commit into
liberfa:mainfrom
eerovaher:inline-Argument-memcpy_if_needed
Aug 10, 2026
Merged

Inline Argument.memcpy_if_needed#314
avalentino merged 1 commit into
liberfa:mainfrom
eerovaher:inline-Argument-memcpy_if_needed

Conversation

@eerovaher

Copy link
Copy Markdown
Collaborator

Before dc90192 the Argument.memcpy_if_needed property was needed to avoid code duplication, but now it can be inlined easily. Furthermore, the code in question raises an error if it cannot generate code for the ufunc wrapper of an ERFA C function, but because an Argument instance does not know which Function it belongs to the error message could not report the ERFA function's name. This PR moves the code to a Function property, so making the error message more informative is very simple.

There are no changes to the files erfa_generator creates.

The code in question raises an error if it cannot generate code for the
ufunc wrapper of an ERFA C function. Now that the code has been inlined
in a `Function` property the error message can report the name of the
ERFA function if the error is triggered.
@avalentino
avalentino merged commit c9bda7b into liberfa:main Aug 10, 2026
27 checks passed
@eerovaher
eerovaher deleted the inline-Argument-memcpy_if_needed branch August 10, 2026 20:42
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