[9fans] python won't link with type safe linker, i.e. -T - Plan9

This is a discussion on [9fans] python won't link with type safe linker, i.e. -T - Plan9 ; they do things like this: foo.h: struct x { #ifdef ZARDOZ int i; #endif int j; }; provider.c: int somefunc(struct x *x){ x->j = 1; } a.c: #include foo.h struct x x; somefunc(&x); b.c #define ZARDOZ #include a.c Yes, include ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [9fans] python won't link with type safe linker, i.e. -T

  1. [9fans] python won't link with type safe linker, i.e. -T

    they do things like this:

    foo.h:
    struct x {
    #ifdef ZARDOZ
    int i;
    #endif
    int j;
    };

    provider.c:
    int somefunc(struct x *x){
    x->j = 1;
    }
    a.c:
    #include foo.h

    struct x x;
    somefunc(&x);

    b.c
    #define ZARDOZ
    #include a.c


    Yes, include a.c. I kid you not. So the type signature of the function
    somefunc is different in a and b. This will all "work", with -T turned
    off, but it's too clever for me.

    We go for simpler things here in NM, such as a school down south
    that, having had a principal dismissed on drug charges, and gang
    fights, and sundry other problems, decided to hire an image
    consultant, to provide the school with a logo, a standard presentation
    style for their powerpont talks, rules for usage of the logo, and a
    set of other tools to help improve the school's brand recognition.
    Oops, I digressed. But NM is interesting, is it not? Our own Lottery
    Authority hired a lobbyist, to ensure that our legislature not enact
    rules requiring that Lottery money go to schools instead of Lottery
    Authority staff. Lobbyist paid for by our Lottery Authority, a part of
    the same government that controls its budget, so is this re-entrancy
    in government? ... Oops, I digressed.

    Working through it now .... twisty ... little ... maze. .......

    ron

  2. Re: [9fans] python won't link with type safe linker, i.e. -T

    > they do things like this:
    >
    > foo.h:
    > struct x {
    > #ifdef ZARDOZ
    > int i;
    > #endif
    > int j;
    > };
    >
    > provider.c:
    > int somefunc(struct x *x){
    > x->j = 1;
    > }
    > a.c:
    > #include foo.h
    >
    > struct x x;
    > somefunc(&x);
    >
    > b.c
    > #define ZARDOZ
    > #include a.c
    >
    >
    > Yes, include a.c. I kid you not. So the type signature of the function
    > somefunc is different in a and b. This will all "work", with -T turned
    > off, but it's too clever for me.
    >


    if "they" were trying to reuse code - the only reason i can come up
    with - "they" could have been more obvious, like:
    /sys/src/games/4s.c
    /sys/src/games/5s.c

    > We go for simpler things here in NM, such as a school down south
    > that, having had a principal dismissed on drug charges, and gang
    > fights, and sundry other problems, decided to hire an image
    > consultant, to provide the school with a logo, a standard presentation
    > style for their powerpont talks, rules for usage of the logo, and a
    > set of other tools to help improve the school's brand recognition.
    > Oops, I digressed. But NM is interesting, is it not? Our own Lottery
    > Authority hired a lobbyist, to ensure that our legislature not enact
    > rules requiring that Lottery money go to schools instead of Lottery
    > Authority staff. Lobbyist paid for by our Lottery Authority, a part of
    > the same government that controls its budget, so is this re-entrancy
    > in government? ... Oops, I digressed.
    >
    > Working through it now .... twisty ... little ... maze. .......


    might just be the "Crawford" field effect, especially if they correlate with W sightings.


+ Reply to Thread