g-wrap-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch against latest G-Wrap


From: Ludovic Courtès
Subject: Patch against latest G-Wrap
Date: Thu, 25 Aug 2005 15:27:43 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Hi,

G-Wrap in address@hidden/g-wrap--dev--0--patch-18' is deeply
broken (doesn't compile).  Below is a patch that fixes some of the
problems I encountered.

There's at least one issue left: the `global-declarations-cg' method in
`(g-wrap guile ws standard)' around line 278 never gets called for some
reason.  I couldn't track it any further.  Actually, the more I have to
debug such things in G-Wrap, the more I feel like re-using code through
inheritance is a bad idea.  And it proves so hard to debug!

Anyway, hope this helps.

Thanks,
Ludovic.


--- orig/g-wrap/c-codegen.scm
+++ mod/g-wrap/c-codegen.scm
@@ -28,6 +28,10 @@
   #:use-module (oop goops)
   
   #:use-module (g-wrap)
+  #:use-module (g-wrap util)
+  #:use-module (g-wrap rti)
+  #:use-module (srfi srfi-11)  ;; let-values
+  #:use-module (srfi srfi-1)   ;; partition!
 
   #:export
   (global-declarations-cg global-definitions-cg


--- orig/g-wrap/rti.scm
+++ mod/g-wrap/rti.scm
@@ -35,6 +35,7 @@
   #:use-module (oop goops)
   #:use-module (g-wrap)
   #:use-module (g-wrap util)
+  #:use-module (g-wrap c-codegen) ;; initializations-cg
   
   #:export
   (<gw-rti-wrapset>
@@ -110,7 +111,8 @@
 (define-method (initialize (type <gw-rti-type>) initargs)
 
   (define (gen-name action) (gen-c-tmp-name type action)) ;; Just lazy
-  
+
+  (format #t "initialize/rti-type~%")
   (next-method)
 
   (if (not (slot-bound? type 'c-const-type-name))
@@ -260,6 +262,7 @@
         "  GWWrapSet *" (c-info-sym wrapset) " = NULL;\n"))
 
 (define-method (initializations-cg (wrapset <gw-rti-wrapset>) err)
+  (format #t "initializations-cg/rti-wrapset~%")
   (list
    (next-method)
    (c-info-sym wrapset) " = gw_wrapset_new(gw__arena, \"" (name wrapset) "\", "





reply via email to

[Prev in Thread] Current Thread [Next in Thread]