octave-maintainers
[Top][All Lists]
Advanced

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

Re: including a new gnulib module


From: Max Brister
Subject: Re: including a new gnulib module
Date: Thu, 26 Jul 2012 08:33:19 -0500

On Thu, Jul 26, 2012 at 2:52 AM, c. <address@hidden> wrote:
>
> Il giorno 26/lug/2012, alle ore 09.51, c. ha scritto:
>
>>
>> Il giorno 24/lug/2012, alle ore 17.35, John W. Eaton ha scritto:
>>
>>> I'm gussing that you need to link with libgnu.la, which is something
>>> that is apparently not done for other files in the DLD-FUNCTIONS
>>> directory.
>>>
>>> But since these functions are quite small and don't rely on any
>>> external libraries except gnulib, it might be better to just put them
>>> in the data.cc file.
>>>
>>> jwe
>>
>> Hi,
>>
>> Here is a new version of the changeset that adds the new functions in 
>> data.cc (and links fine)
>> I can't push it at the moment as the connection to the mercurial repo at 
>> savannah
>> appears to be down.
>>
>> BTW, is there a better way than copying data as I did in this implementation 
>> to create
>> an Array<double> from double[] ?
>>
>> thanks,
>> c.

A better way to do the copy might be using std::copy. For example,
double *dout = reinterpret_cast<double *> (out);
std::copy (dout, dout + l, res.fortran_vec ());

Also, reinterpret_cast is used instead of (double *). This is because
we prefer C++ style casts over C style casts in core.

Max Brister


reply via email to

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