Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Bauer, Christoph" <Christoph.Bauer@lms-gmbh.de>
To: caml-list <caml-list@inria.fr>
Subject: [Caml-list] segfault in caml_copy_string
Date: Fri, 16 Jul 2004 16:10:47 +0200	[thread overview]
Message-ID: <D981925B4F2CD611870300E0184CEE9B0157F214@kaiserslautern1.lms-gmbh.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 437 bytes --]

Hi,

here is a simple C-function:

CAMLprim value getparam(value request, value key)
{
  CAMLparam2(request, key);
  const char * result;
  CAMLreturn(key);  /* 1 */
  CAMLreturn(caml_copy_string("test")); /* 2 */
 }

Version 1 returns the key and everything works (except that
key is not what I need.)

Version 2 calls caml_copy_string and this fails. Has anybody a idea why?

OCaml Version is 3.08.0.

Thanks for help,
Christoph Bauer

[-- Attachment #2: Type: text/html, Size: 1149 bytes --]

             reply	other threads:[~2004-07-16 14:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-16 14:10 Bauer, Christoph [this message]
2004-07-16 14:22 ` Basile Starynkevitch [local]

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=D981925B4F2CD611870300E0184CEE9B0157F214@kaiserslautern1.lms-gmbh.de \
    --to=christoph.bauer@lms-gmbh.de \
    --cc=caml-list@inria.fr \
    /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