[Top][All Lists]

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

Re: [forge] multiples private strsplit.m

From: Carnë Draug
Subject: Re: [forge] multiples private strsplit.m
Date: Sun, 21 Jun 2015 13:38:52 +0100

On 20 June 2015 at 07:19, Marco Atzeri <address@hidden> wrote:
> Hi,
> running tests for most forge package m-files, that I am packaging
> for cygwin, I noticed that there are some old copy of strsplit.m around
> /usr/share/octave/packages/cgi-0.1.0/@cgi/private/strsplit.m
> /usr/share/octave/packages/dataframe-1.1.0/@dataframe/private/strsplit.m
> /usr/share/octave/packages/miscellaneous-1.2.1/private/strsplit.m
> [...]
> Questions:
> - any specific reason to maintain this private function in the
>   packages ?

The function was copied there when Octave core had to make backwards
incompatible changes to its strsplit (Matlab compatibility).  Maintained
packages were updated properly.  In other cases, it was just simpler to
copy the old function until someone with interest comes along to do it

>   If I understood correctly private functions are only used if
>   octave itself do not provide them.

No.  Stuff in a directory named private is only visible to the functions
on the parent directory.  Mostly this is used to share a private function
between multiple public functions.  In this case it was used to make the
old version of strsplit visible only to the functions in the package without
affecting the rest of Octave.

> - it was ever used the form
>      strsplit ("road to^hell", " ^")
>   instead of
>      strsplit ("road to^hell", {" ","^"})
>   for what I see the three package do not use it.

Maybe the packages will continue to work with the new version of strsplit
but without tests on those functions, I'm not going to risk it.  It will
have to wait for the package maintainer to decide.


reply via email to

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