[Scilab-Dev] Evolution of Scilab API

Antoine ELIAS antoine.elias at scilab-enterprises.com
Wed Feb 14 09:45:44 CET 2018


Hello,

First one ( API 1 ) was write to be "compatible" between Scilab 5 and 
Scilab 6. ( except last arg, int -> void*, sorry about that )
So in Scilab 6 we reproduce stack behavior ( Top, Rhs, LhsVar(x) = y), 
but that produce lot of copy, move of data).
The second ( API 2 ) is the nearest from internal memory of Scilab 6.

@Stéphane: Both API can be used, we don't plan to remove API 1.

@Arvid:
Did you take a look of SCI/contrib/toolbox_skeleton/sci_gateway/c ? 
(http://cgit.scilab.org/scilab/tree/scilab/contrib/toolbox_skeleton/sci_gateway/c?h=6.0.0)
I wrote same gateways with API 1 and API 2.

Regards,
Antoine
Le 13/02/2018 à 19:10, Arvid Rosén a écrit :
> I’m also interested in knowing this since I need to port a bunch of 
> libraries from scilab 4/5 to version 6.
> The documentation is a bit confusing in this area.
>
> A tiny example with minimalistic code and a Makefile showing best 
> practices for C and C++ in scilab 6 would be great!
>
> Cheers,
> Arvid
>
> Hämta Outlook för iOS <https://aka.ms/o0ukef>
> ------------------------------------------------------------------------
> *From:* dev <dev-bounces at lists.scilab.org> on behalf of Stéphane 
> Mottelet <stephane.mottelet at utc.fr>
> *Sent:* Tuesday, February 13, 2018 4:45:41 PM
> *To:* List dedicated to development questions
> *Subject:* [Scilab-Dev] Evolution of Scilab API
> Hello,
>
> I am a bit puzzled by the evolution of Scilab api since Scilab 5.x
> versions. I have understood that the old stack system has dissapeared,
> but now I am very confused because it seems that two different ways of
> interfacing C code do exist. For example
>
> #include "api_scilab.h"
> #include <localization.h>
> #include <string.h>
> #include "Scierror.h"
> int fun(char *fname, void *pvApiCtx)
>
> or
>
> #include "api_scilab.h"
> #include <localization.h>
> #include <string.h>
> #include "Scierror.h"
> int fun(scilabEnv env, int nin, scilabVar* in, int nopt, scilabOpt opt,
> int nout, scilabVar* out)
>
> Is the first snipplet of code above considered as obsolete ?
>
> Thanks for help
>
> S.
>
>
> -- 
> Stéphane Mottelet
> Ingénieur de recherche
> EA 4297 Transformations Intégrées de la Matière Renouvelable
> Département Génie des Procédés Industriels
> Sorbonne Universités - Université de Technologie de Compiègne
> CS 60319, 60203 Compiègne cedex
> Tel : +33(0)344234688
> http://www.utc.fr/~mottelet <http://www.utc.fr/%7Emottelet>
>
> _______________________________________________
> dev mailing list
> dev at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/dev
>
>
> _______________________________________________
> dev mailing list
> dev at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20180214/a2a4c75d/attachment.htm>


More information about the dev mailing list