[Top][All Lists]

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

Re: argz SMOB

From: Paul Jarc
Subject: Re: argz SMOB
Date: Thu, 15 Jan 2004 19:21:50 -0500
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux)

Brian S McQueen <address@hidden> wrote:
> Particularly, I wonder about the best way to produce a null
> terminated C string from a scheme string.

char* s=SCM_STRING_CHARS(scheme_string);

Or do you need a separate copy?

> static SCM printer_hostile_printer(SCM scm_out_buff) {
>   struct argz_holder out_buff;
>   SCM_ASSERT (SCM_STRINGP (scm_out_buff), scm_out_buff, SCM_ARG1,
> "printer_hostile_printer");

You could also write that as:
#define FUNC_NAME s_printer_hostile_printer
SCM_DEFINE(printer_hostile_printer, "printer_hostile_printer",
           1, 0, 0, (SCM scm_out_buff))
  struct argz_holder out_buff;
  SCM_VALIDATE_STRING(SCM_ARG1, scm_out_buff);


reply via email to

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