[Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9899 >
Benoit Hudson wrote:
> Question: why does dio take an int* rather than returning int? If we
> just made it return int, everything would be peachy.
The dio functions can conceivably handle any type, not just scalars.
See dio_get_effect. However some types are hard-coded in the python
code and this I do not understand.
> Enums pose a special problem all their own. I don't see how we can do
> anything with them but:
> int tmp;
> dio(&tmp);
> myenum = tmp
> solution.
Indeed. However this can be done "automatically" by making the field in
the packet struct an int. For instance packets.def has
type CLAUSE = uint8(enum clause_type)
meaning the packet struct uses the enum clause_type, and we have a
problem. However if this were
type CLAUSE = uint8(uint8)
then there would be no cast needed later, but the conversion would be
done automatically when the packet struct was filled out.
jason
- [Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, (continued)
- [Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Mike Kaufman, 2004/09/01
- [Freeciv-Dev] (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Benoit Hudson, 2004/09/01
- [Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Per I. Mathisen, 2004/09/01
- [Freeciv-Dev] (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Benoit Hudson, 2004/09/01
- [Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Jason Short, 2004/09/01
- [Freeciv-Dev] (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Benoit Hudson, 2004/09/02
- [Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Jason Short, 2004/09/02
- [Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Benoit Hudson, 2004/09/02
- [Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Benoit Hudson, 2004/09/02
- [Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Jason Short, 2004/09/02
- [Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289,
Jason Short <=
- [Freeciv-Dev] (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Gregory Berkolaiko, 2004/09/02
- [Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Benoit Hudson, 2004/09/02
- [Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Brett Albertson, 2004/09/02
- [Freeciv-Dev] (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Brett Albertson, 2004/09/02
- [Freeciv-Dev] (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Benoit Hudson, 2004/09/02
- [Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Jason Short, 2004/09/02
- [Freeciv-Dev] Re: (PR#9899) Assertion failed: cont > 0, file improvement.c, line 289, Benoit Hudson, 2004/09/02
|
|