From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: micha-1@fantasymail.de
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] native values in objects from c
Date: Tue, 29 Aug 2006 22:05:11 +0900 (JST) [thread overview]
Message-ID: <20060829.220511.27011347.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <20060829115002.108020@gmx.net>
From: "Michael Wohlwend" <micha-1@fantasymail.de>
> with that code:
>
> class x = object
> val name = "hoho"
> end;;
>
> let ho = new x in ...
>
>
> how do I access the field name form C?
>
> The docu says it should be the third field of the block, but that doesn't work for me (it has Tag 0, not 252 for strings ...)
Well, since fields start at 0, the 3rd field is number 2.
# Obj.size (Obj.repr ho);;
- : int = 3
# Obj.tag (Obj.field (Obj.repr ho) 2);;
- : int = 252
Jacques Garrigue
next prev parent reply other threads:[~2006-08-29 13:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-29 11:50 Michael Wohlwend
2006-08-29 13:05 ` Jacques Garrigue [this message]
2006-08-29 14:07 ` [Caml-list] " Michael Wohlwend
2006-08-31 6:55 ` Jacques Garrigue
2006-08-31 8:22 ` Michael Wohlwend
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060829.220511.27011347.garrigue@math.nagoya-u.ac.jp \
--to=garrigue@math.nagoya-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=micha-1@fantasymail.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox