python/pypngtile.pyx
changeset 104 b5ae988c78b8
parent 91 0bf7878bdf5c
child 133 67f956b71bdf
equal deleted inserted replaced
103:1a6a6957197d 104:b5ae988c78b8
    95             OPEN_UPDATE     - allow .update()
    95             OPEN_UPDATE     - allow .update()
    96     """
    96     """
    97 
    97 
    98     cdef pt_image *image
    98     cdef pt_image *image
    99 
    99 
       
   100     # XXX: should really be a pt_image property...
       
   101     cdef readonly object path
       
   102 
   100     
   103     
   101     # open the pt_image
   104     # open the pt_image
   102     def __cinit__ (self, char *path, int mode = 0) :
   105     def __cinit__ (self, char *path, int mode = 0) :
   103         cdef int err
   106         cdef int err
       
   107 
       
   108         # store
       
   109         self.path = path
   104         
   110         
   105         # open
   111         # open
   106         with nogil :
   112         with nogil :
   107             # XXX: I hope use of path doesn't break...
   113             # XXX: I hope use of path doesn't break...
   108             err = pt_image_open(&self.image, NULL, path, mode)
   114             err = pt_image_open(&self.image, NULL, path, mode)