MoarVM/MoarVM — pull request #45 by gerdr (2013-08-11 13:00:33+00:00)
Title: Forward-declare all public types

This adds forward declarations for all public `struct` and `union` types (ie those whose names start with `MVM`) to `src/types.h`.

If you want to add a new structure type `MVMFoo`, you now need to add a declaration

typedef struct MVMFoo MVMFoo;

to `src/types.h`.

The definition then looks like

struct MVMFoo { ... };

`enum` types still should be defined as

typedef enum { ... } MVMBar;

Non-public types of course can be defined however one likes.

See http://irclog.perlgeek.de/perl6/2013-08-10#i_7434577 for a general discussion and http://irclog.perlgeek.de/moarvm/2013-08-11#i_7436094 for the OK on renaming `P6xxx` to `MVMP6xxx`.

Note that some naming weirdness still remains, eg https://github.com/gerdr/MoarVM/blob/27aa573810ea835ee3a8898c371ff5beb218d620/src/6model/reprs.c#L227