Skip to content

Commit

Permalink
A tiny bit of simplification, README edits, and site update
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Nov 29, 2024
1 parent 32f0fc5 commit 86e8bda
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ Changes for the next feature release, expected around 1 February 2025.

### Changed

- #96: Changed `object` structure to include `novas_orbital` for `NOVAS_ORBITAL_OBJECT` types.
- #96: Changed `object` structure to include `novas_orbital` for `NOVAS_ORBITAL_OBJECT` types. To keep ABI
compatibility to earlier SuperNOVAS releases, `make_object()` will not initialize the new `.orbit` field _unless_
`type` is set to `NOVAS_ORBITAL_OBJECT` (which was not available before).

- #97: Updated `NOVAS_PLANETS`, `NOVAS_PLANET_NAMES_INIT`, and `NOVAS_RMASS_INIT` macros to include the added planet
constants.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ code:
// Optionally you may use a separate ephemeris dataset for major planets
// (or if planet ephemeris was included in 'eph' above, you don't have to)
t_calcephbin *pleph = calceph_open(...);
int status = novas_use_calceph(pleph);
int status = novas_use_calceph_planets(pleph);
if(status < 0) {
// Ooops something went wrong...
}
Expand Down
8 changes: 2 additions & 6 deletions src/novas.c
Original file line number Diff line number Diff line change
Expand Up @@ -6755,8 +6755,8 @@ short make_object(enum novas_object_type type, long number, const char *name, co
if(!source)
return novas_error(-1, EINVAL, fn, "NULL input source");

// FIXME for version v2.x initialize the entire structure again...
memset(source, 0, offsetof(object, orbit));
// FIXME will not need special case in v2.x
memset(source, 0, type == NOVAS_ORBITAL_OBJECT ? sizeof(object) : offsetof(object, orbit));

// Set the object type.
if(type < 0 || type >= NOVAS_OBJECT_TYPES)
Expand All @@ -6769,10 +6769,6 @@ short make_object(enum novas_object_type type, long number, const char *name, co
if(number < 0 || number >= NOVAS_PLANETS)
return novas_error(2, EINVAL, fn, "planet number %ld is out of bounds [0:%d]", number, NOVAS_PLANETS - 1);

// FIXME will not need special case in v2.x
if(type == NOVAS_ORBITAL_OBJECT)
memset(&source->orbit, 0, sizeof(source->orbit));

source->number = number;

if(name) {
Expand Down

0 comments on commit 86e8bda

Please sign in to comment.