realbasic-nug
[Top] [All Lists]

Re: declare w/ strings and arrays

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: declare w/ strings and arrays
From: Charles Yeomans <yeomans at desuetude dot com>
Date: Thu, 30 Sep 2004 15:47:17 -0400
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <BD81AC54 dot 58B27%mars at realsoftware dot com>

On Sep 30, 2004, at 3:28 PM, Mars Saxman wrote:

yeomans at desuetude dot com wrote:

First, the stringPtr work is unnecessary; you can pass an Rb String in
the function, and somehow a CString will be what's actually fed to the
function.

I don't believe that applies in this case; from his description, it sounds like the fourth parameter is an output buffer where nc_get_var1_text can write its results. If that is the case, then it would be very bad news to pass in an RB string; the CString type is equivalent to "const char*", not
to "char*".


Oops; my eyes put the const in the wrong place. You're quite right.


Charles Yeomans

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>