[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] event stuff committed

From: ksterker
Subject: Re: [Adonthell-devel] event stuff committed
Date: Fri, 30 Apr 2004 09:46:04 +0200

Hi Sasha!

> A few minor fixes.
> --- 1 ---
> M src/base/
> M src/base/
> M src/base/flat.h
> Do not have <stdio.h> in them but use C-style I/O.  I just add include in
> them but I'm not sure if it the way you want it to be handled.

Since the first two both include flat.h, it should be enough to add <stdio.h> 
only to flat.h. Perhaps, a file included by flat.h already includes stdio.h, in 
which case it could be ommitted. Will have to check that.

> --- 2 ---
> Compilations error:

> In function `struct PyObject * 
> python::get_tuple(base::flat &,
> short unsigned int = 0)':
> ../../src/python/python.h:184: too few arguments to function `struct
> PyObject * python::pass_instance<const char *>(const char *,
> python::ownership)'
> at this point in file
> --->      PyTuple_SetItem (tuple, i, pass_instance ((const char*) 
> value));
> I commented those lines out to get further :) I'm running python 2.2

Weird that it worked for me. pass_instance indeed requires 2 parameters. 
Replace it with 
    PyTuple_SetItem (tuple, i, pass_instance ((const char*) value), 0);

You'll have to do the same 5 lines below.

> --- 3 ---
> I had swig-1.3.14 which does not support -runtime option.  Somehow
> ./configure let me through without fatal error.

Okay, we'll need to check for SWIG 1.3.20 or above, then ... 

> --- 4 ---
> Am I right that you need to ran it like:
> ../src/
> We may need to add chmod +x ../src/

Yeah. Or you run sh ../src/ ... - that should work as well.

> address@hidden:~/adonthell/apr2004/adonthell/test$ ../src/
> #1 1 30 5
> ....
> #2 Destroying
>   Returning to previously saved state
> OK

> very well can be related to my hack

I guess so. Please try it with the proper fix above. With the line removed, the 
method parameters will not be restored correctly, which could easily lead to a 

> Good job Kai!

Thanks for the excellent bug report. I'll add your fixes during my lunch break 
and commit them today.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]