Skip to content

Removed all uses of I as a variable to fix conflict with complex.h - #64

Open
JeffreyBroll wants to merge 8 commits into
drsteve:masterfrom
JeffreyBroll:stab_the_Is_out
Open

JeffreyBroll wants to merge 8 commits into
drsteve:masterfrom
JeffreyBroll:stab_the_Is_out

Conversation

@JeffreyBroll

Copy link
Copy Markdown

Address #62 by removing uses of `I'

Comment thread libLanlGeoMag/ComputeLstar.c
Comment thread libLanlGeoMag/ComputeI_FromMltMlat.c
Comment thread libLanlGeoMag/Lgm_ComputeLstarVersusPA.c Outdated
Comment thread libLanlGeoMag/Lgm_McIlwain_L.c
Comment thread libLanlGeoMag/OlsenPfitzerDynamic.c Outdated
Comment thread libLanlGeoMag/OlsenPfitzerStatic.c Outdated
Comment thread libLanlGeoMag/TA16.c Outdated
@JeffreyBroll

Copy link
Copy Markdown
Author

I think I got them all.

@drsteve drsteve left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Working through this, I was concerned that changing the structure members from I to something else (e.g., I_data) might break dependent code.
While we can't trap everything that users may have wanted, we can ensure that we don't break our own tools or examples. I haven't checked the Examples directory, but Tools/MagEphemFromSpiceKernel.c and Tools/MagEphemFromTLE.c are definitely affected. It's likely that the same is true for the MagEphem examples. The Python interface should also be checked... (and it'd be nice to just triple check that the name really needs changing in the structure to avoid the clash).

I'll also need to update some local code that uses I from the structures, so we'll have to make sure this (fairly high chance of breaking things) change is recorded in the changelog to let other users know.

@JeffreyBroll

Copy link
Copy Markdown
Author

I was considering, as an extreme(ly silly) precaution, that we could raise their macros with another macro to re-rename new things back to old... but really I'm just surprised that this collision hasn't become an issue already. I'll start updating and checking examples.

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