cy99 / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

f->close missing () #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
ben@bds2:/tmp$ shedskin dxfpurgeblocks
*** SHED SKIN Python-to-C++ Compiler 0.1 ***
Copyright 2005-2008 Mark Dufour; License GNU GPL version 3 (See LICENSE)

[iterative type analysis..]
***
iterations: 3 templates: 312
[generating c++ code..]

ben@bds2:/tmp$ make
g++  -O2 -pipe -Wno-deprecated  -I. -I/home/ben/shedskin/shedskin-0.1/lib
/home/ben/shedskin/shedskin-0.1/lib/stat.cpp
/home/ben/shedskin/shedskin-0.1/lib/sys.cpp
/home/ben/shedskin/shedskin-0.1/lib/builtin.cpp dxfpurgeblocks.cpp
/home/ben/shedskin/shedskin-0.1/lib/os/__init__.cpp
/home/ben/shedskin/shedskin-0.1/lib/os/path.cpp
/home/ben/shedskin/shedskin-0.1/lib/re.cpp -lgc -lpcre  -lutil -o
dxfpurgeblocks
dxfpurgeblocks.cpp: In function ‘void __dxfpurgeblocks__::__init()’:
dxfpurgeblocks.cpp:216: error: statement cannot resolve address of
overloaded function
/home/ben/shedskin/shedskin-0.1/lib/os/__init__.cpp: In function ‘int
__os__::tcgetpgrp(int)’:
/home/ben/shedskin/shedskin-0.1/lib/os/__init__.cpp:630: warning:
converting to non-pointer type ‘int’ from NULL
make: *** [dxfpurgeblocks] Error 1

As you can see, shedskin completed without error.  The resulting code
failed to compile.  I fixed this by changing f->close to f->close() in the
generated dxfpurgeblocks.cpp.

Original issue reported on code.google.com by benjamin...@gmail.com on 11 Apr 2009 at 1:58

GoogleCodeExporter commented 8 years ago
thanks for reporting. I fixed the warning in os/__init__.cpp (btw, which 
version of
GCC are you using?), but I cannot reproduce the f->close problem. could you 
please
attach the program you are trying to compile, or the part that triggers the 
problem? 

Original comment by mark.duf...@gmail.com on 11 Apr 2009 at 4:41

GoogleCodeExporter commented 8 years ago
gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

Original comment by benjamin...@gmail.com on 13 Apr 2009 at 12:29

Attachments:

GoogleCodeExporter commented 8 years ago
hmm, I think you might want to have another good look at the last line of the 
Python
program.. :)

the reason shedskin cannot compile this is that you cannot pass references to 
methods
yet, as mentioned in the tutorial.

Original comment by mark.duf...@gmail.com on 13 Apr 2009 at 2:24