Skip to content

Transition from nwp to nw, mtp to mt, MHp to MH, etc. in the C API? #317

Open
@krivit

Description

@krivit

nwp made sense back when NetworkInitialize() returned a struct and it was up to the user to allocate the memory for storing it, so the following code made sense:

Network nw = NetworkInitialize(...);
subtroutine(&nw, ...)

with

void subroutine(Network *nwp, ...){
...
}

Nowadays, though, NetworkInitialize() allocates the struct and returns a pointer, so assigning to a Network never happens.

Same goes for others.

We can probably make a smooth transition with macros

#define nwp nw
#define mtp mt
#define MHp MH

etc.

Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions