fix: update examples to the one-parameter nec_geometry_complete - #129
Open
charlieh0tel wants to merge 1 commit into
Open
fix: update examples to the one-parameter nec_geometry_complete#129charlieh0tel wants to merge 1 commit into
charlieh0tel wants to merge 1 commit into
Conversation
nec_geometry_complete() dropped its unused second parameter (CHANGELOG,
"nec_geometry_complete() now takes only one parameter"), but the C and Ruby
examples were not updated with it. example/test_nec.c does not compile against
the shipped libnecpp.h:
error: too many arguments to function 'nec_geometry_complete'
24 | NEC_ERROR_HANDLE(nec_geometry_complete(nec, 1, 0));
libnecpp.h:201: note: declared here
201 | long nec_geometry_complete(nec_context* in_context, int gpflag);
Three call sites in test_nec.c and one in test.rb. The Python examples and the
test harness were already updated.
With this, test_nec.c builds clean under -Wall and runs: the seven-wire
antenna reports Z = 595.415366 - j354.438287 and 6.328267 dB max gain.
Contributor
Author
|
Closing — opened prematurely on my side; I'll route this through my own fork first. |
Contributor
Author
|
Reopened — this is active. Disregard the closing note above. |
Owner
|
Great, thanks for this. I'll have a look asap. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
nec_geometry_complete()dropped its unused second parameter — CHANGELOG: "nec_geometry_complete() now takes only one parameter. The second parameter was unused." The Python examples and the test harness were updated with it; the C and Ruby examples were not.The result is that
example/test_nec.cdoes not compile against the shippedlibnecpp.h:Three call sites in
example/test_nec.c, one inexample/test.rb.Verification
With this change
test_nec.cbuilds clean under-Walland runs correctly against the installed library:Found while building nec2++ to WebAssembly — the examples are the natural reference for the C API, so the first thing tried was the first thing that didn't compile.