This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Name of smob type, new field in scm_smobfuns?


Mikael Djurfeldt <mdj@nada.kth.se> writes:

> + We could make it easier to add new features in the future (How, though?)

One ugly but long-term useful hack I've used in the past is to put junk
on the end of structures that are likely to grow:

typedef struct _scm_smobfuns {
    int a_real_field;
    int b_real_field;
    int future_needs[20];
} scm_smobfuns;

This will ensure binary compatibilty for a while at least...

Please ignore if it's too ugly to contemplate.

-russ