[GRASS-dev] Re: [GRASS GIS] #308: Compiler error while building python swig

GRASS GIS trac at osgeo.org
Thu Sep 11 23:53:09 EDT 2008


#308: Compiler error while building python swig
----------------------------------+-----------------------------------------
  Reporter:  cgsbob               |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect               |      Status:  new                      
  Priority:  major                |   Milestone:  6.4.0                    
 Component:  SWIG (all bindings)  |     Version:  svn-develbranch6         
Resolution:                       |    Keywords:  python swig              
  Platform:  Unspecified          |         Cpu:  Unspecified              
----------------------------------+-----------------------------------------
Comment (by hamish):

 we can echo {{{ #define __attribute__(x) }}} >> *.i at the top of the swig
 interface file if access to those functions are desired.

 Perhaps leaving out G_fatal_error() is good due to the exit(1).
 A scripter can access the other G_message()s with a call to the g.message
 module if they like, maybe that method could be wrapped.

 My guess is that access to the core GIS engine processing functions is the
 thing real value to SWIGers. Python probably has its own (possibly nicer)
 versions of any G_string_manipulate() function that libgis provides.

 We only have to provide interfaces to functions which would be useful. But
 I don't want to limit others needlessly based on my lack of imagination
 wrt what is "useful".

 AFAIU #includes are ignored/not followed, so I'll filter those out to
 avoid confusion, while leaving other preprocessor #ifdefs and #defines in
 place.

 GC:
 > But then there's the more fundamental problem that the other
 > interfaces/*.i files are duplicating information from the headers,
 > and are somewhat out of date. And it's safe to say that anything
 > which attempts to duplicate information from the headers will be
 > continually out of date. The SWIG stuff is going to have to use
 > the actual headers directly.

 Right, AFAIK that's a known issue and not done currently simply because it
 is still waiting on the TODO list and none of the devels are actively
 working this part of the code.

 At minimum I'll make a note of it in the Makefile.


 Hamish

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/308#comment:10>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list