> The offending statements were added in revision 2131 to joystick.cAbsolutely! Maybe as a newbie to the list I'm out of line suggesting this, but I took a quick look at the "Setup" file and it might be beneficial to implement a different debug scheme ... that way a developer or developers could dump extra info and/or specify added build parameters for a file as desired, but it would be easier for whomever builds the release to see that, if the modified Setup file is uploaded to the repository.
> (ViewCVS: http://www.seul.org/viewcvs/viewcvs.cgi?rev=2131&root=PyGame&view=rev).
> I'm not sure what's being tested, but these statements definitely do
> not belong there (at the very least, they should be protected by
> #ifdef DEBUG).
Setup under the 1.9.1 release code currently contains:
#DEBUG = -C-W -C-Wall
DEBUG =
with the build instruction for joystick.c being:
joystick src/joystick.c $(SDL) $(DEBUG)
Possibly replace that with something like:
CFLAGS = -C-W -C-Wall
DEBUG = -D DEBUG
with the build instruction now looking like
joystick src/joystickc $(SDL) $(CFLAGS) $(DEBUG)
for debugging, and
joystick src/joystick.c $(SDL) $(CFLAGS)
for release. The developer would, as you suggested, wrap debug-only statements with a #ifdef DEBUG / #endif pair.
I'd guess that there are other ways to implement this, perhaps with individual CFLAGS/DEBUG variables for each source file, but the above might be the least intrusive and easy to spot during the release process.
-Len
Robert Xiao wrote:
On Aug 11, 4:55 am, Len <lkap...@xxxxxxxxxxxxxx> wrote:
Hi,These are present in the prebuilt pygame for Windows as well.
Unless I've built 1.9.1 wrong, it looks like there are several
executable (debug-type) printf() statements embedded in joystick.c ...
the test code below shows the output from one of them - it's pretty
rudimentary, plug in a joystick first!
I didn't see any references to these in the list archives up to AugustI was about to report these when I saw your post.
9, so I'll apologize in advance if they've already been reported.
The offending statements were added in revision 2131 to joystick.c
(ViewCVS: http://www.seul.org/viewcvs/viewcvs.cgi?rev=2131&root=PyGame&view=rev).
I'm not sure what's being tested, but these statements definitely do
not belong there (at the very least, they should be protected by
#ifdef DEBUG).
Robert