[plt-scheme] PLT Scheme v370

From: Eli Barzilay (eli at barzilay.org)
Date: Fri May 25 09:55:48 EDT 2007

On May 25, Hans Oesterholt-Dijkema wrote:
> Eli Barzilay schreef:
> >> void g(Scheme_Object *o)
> >> {
> >>   char *s=SCHEME_STR_VAL(o);
> >>   global_pointer[0]=s*+10*;
> >>   ...
> >> }
> >
> > BTW, I don't know what `s*+10*' is trying to achieve, but also note
> > that 3m does not like pointers into the middle of allocated objects.
> >
> That's of course completely theoretical. BTW s*+10* is trying to achieve 
> +10 in bold.

Ah.  You should not do that then.  For example, the foreign
interface's implementation of add-ptr keeps a pointer + integer offset
field.  When it is referenced, there is a way to tell xform that the
pointer arithmetic operation is ok -- see the source for details.


On May 25, Hans Oesterholt-Dijkema wrote:
> Of course I'm trying to estimate the impact of m3 on my mzgtk2 Gtk+
> bindings.  I have some real C code in there. that is compiled with a
> C compiler. Is it possible to compile this code through mzc? Or was
> this not what you meant with compiling with mzc?

If the code is dealing with Scheme objects directly, you will need to
go through mzc.  Otherwise, values will move around, but your pointers
will not be updated.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.