[postgis-devel] [PostGIS] #2089: liblwgeom cannot be used through python ctypes

PostGIS trac at osgeo.org
Mon Nov 12 06:05:52 PST 2012

#2089: liblwgeom cannot be used through python ctypes
 Reporter:  brushtyler   |       Owner:  strk         
     Type:  enhancement  |      Status:  new          
 Priority:  medium       |   Milestone:  PostGIS 2.1.0
Component:  liblwgeom    |     Version:  trunk        
 Keywords:               |  

Comment(by brushtyler):

 Replying to [comment:2 strk]:
 > postgis and pgraster libs already have their initialization code that
 could install those routines too...

 are you talking about the rt_init_allocators function?
 That one is called when the raster lib tries to allocate something, so I
 suppose is not the right place to call the "lwgeom_set_handlers" function
 because we don't know if lwgeom needs to allocate something before the
 rt_init_allocators is called.

 BTW, I found that the RTLD_LAZY mode can be used to avoid it raises an
 error, though python ctypes doesn't export that name... I should use
 "mode=1" opening the library.

 > Feel like working on a patch ?

 Yes, but I've to understand what should be changed. Surely I must add a
 lwgeom_set_handlers function.

Ticket URL: <http://trac.osgeo.org/postgis/ticket/2089#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.

More information about the postgis-devel mailing list