bug-gnubg
[Top][All Lists]
Advanced

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

[Bug-gnubg] DB interface bugs


From: Massimiliano . Maini
Subject: [Bug-gnubg] DB interface bugs
Date: Mon, 21 Nov 2005 18:04:14 +0100

I've tested the db interface under WinXP with SQLite, 2 problems :

1) database.py has some bugs (SQLite only I suppose, since somebody
has managed to succesfully use the db interface with postgre). I've
modified some stuff to make it work, if anybody wants to have a look
at it (and eventually commit) I can email the file.

2) once database.py fixed, I can init a db (cmd : relational test),
add matches (relational add match), show details (relational show
details gnubg) but I can't show players or environments (relational show
players/environments) : I get an output where each item m"string" is
replaced by "[unknown type]". The "bug" seems to be in relational.c
(RunQuery) : the results returned by a db query are tested to detect
the type and handle accordingly, but the type Unicode (PyUnicode_Check)
is not handled and that's exactly the type I get when I query for players/
envs (guess this too is specific to SQLite ...).
I tried a cheap trick (handling PyUnicode objects like PyString objects,
i.e. using PyString_AsString), but this works only for "standard" chars
(i.e. if I put an "é" (e with an accent) in a player/env name then it
crashes when displaying it; note that it doesn't crash entering it !).
I tried using wchar_t and PyUnicode_AsWideChar to get a wchar string,
then to sprintf it into a char string but didn't work. Anybody knows
how to handle this the right way ?


MaX.

P.S.
Any "MinGW" expert can tell me if there's a way to get man pages for the
C language under MinGW ?
Any "Python experrt" can tell me how to run a script from the Python
prompt ?







reply via email to

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