chiark / gitweb /
Added ALLOCATE-FOREIGN method
[clg] / rsvg / rsvg.lisp
index 489ef4cfe6d41bebfbb84c37d87a6f45099316e2..c2d5872fea0f1787ab484e07bf5c06dc91b3c5d3 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: rsvg.lisp,v 1.2 2006-02-08 22:21:26 espen Exp $
+;; $Id: rsvg.lisp,v 1.3 2006-02-09 22:33:13 espen Exp $
 
 (in-package "RSVG")
 
 
 (in-package "RSVG")
 
@@ -111,15 +111,14 @@ (defbinding %handle-new-from-file () pointer
   (filename pathname)
   (nil gerror :out))
 
   (filename pathname)
   (nil gerror :out))
 
-(defmethod initialize-instance ((handle handle) &key filename)
+(defmethod allocate-foreign ((handle handle) &key filename)
   (multiple-value-bind (location gerror)
       (cond 
        (filename (%handle-new-from-file filename))
        (t (%handle-new)))
     (if gerror 
        (signal-gerror gerror)
   (multiple-value-bind (location gerror)
       (cond 
        (filename (%handle-new-from-file filename))
        (t (%handle-new)))
     (if gerror 
        (signal-gerror gerror)
-      (setf (foreign-location handle) location)))
-  (call-next-method))
+      location)))
 
 
 (defbinding %handle-free () nil
 
 
 (defbinding %handle-free () nil