<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font size="-1">Hello,<br>
      <br>
      First one ( API 1 ) was write to be "compatible" between Scilab 5
      and Scilab 6. ( except last arg, int -> void*, sorry about that
      )<br>
      So in Scilab 6 we reproduce stack behavior ( Top, Rhs, LhsVar(x) =
      y), but that produce lot of copy, move of data).<br>
      The second ( API 2 ) is the nearest from internal memory of Scilab
      6.<br>
      <br>
      @Stéphane: Both API can be used, we don't plan to remove API 1.<br>
      <br>
      @Arvid:<br>
      Did you take a look of SCI/contrib/toolbox_skeleton/sci_gateway/c
      ?
(<a class="moz-txt-link-freetext" href="http://cgit.scilab.org/scilab/tree/scilab/contrib/toolbox_skeleton/sci_gateway/c?h=6.0.0">http://cgit.scilab.org/scilab/tree/scilab/contrib/toolbox_skeleton/sci_gateway/c?h=6.0.0</a>)<br>
      I wrote same gateways with API 1 and API 2.<br>
    </font><br>
    Regards,<br>
    Antoine<br>
    <div class="moz-cite-prefix">Le 13/02/2018 à 19:10, Arvid Rosén a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:DB3PR0202MB3273522588F299EF1BD325EFA1F60@DB3PR0202MB3273.eurprd02.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Exchange Server">
      <!-- converted from text -->
      <style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
      <div>
        <div id="x_compose-container" itemscope=""
          itemtype="https://schema.org/EmailMessage"
          style="direction:ltr">
          <span itemprop="creator" itemscope=""
            itemtype="https://schema.org/Organization"><span
              itemprop="name"></span></span>
          <div>
            <div>
              <div style="direction:ltr">I’m also interested in knowing
                this since I need to port a bunch of libraries from
                scilab 4/5 to version 6.</div>
              <div style="direction:ltr">The documentation is a bit
                confusing in this area.</div>
              <div><br>
              </div>
              <div style="direction:ltr">A tiny example with
                minimalistic code and a Makefile showing best practices
                for C and C++ in scilab 6 would be great!</div>
              <div><br>
              </div>
              <div style="direction:ltr">Cheers,</div>
              <div style="direction:ltr">Arvid</div>
            </div>
            <div><br>
            </div>
            <div class="x_acompli_signature">Hämta <a
                href="https://aka.ms/o0ukef" moz-do-not-send="true">Outlook
                för iOS</a></div>
          </div>
        </div>
        <hr tabindex="-1" style="display:inline-block; width:98%">
        <div id="x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
            face="Calibri, sans-serif" color="#000000"><b>From:</b> dev
            <a class="moz-txt-link-rfc2396E" href="mailto:dev-bounces@lists.scilab.org"><dev-bounces@lists.scilab.org></a> on behalf of Stéphane
            Mottelet <a class="moz-txt-link-rfc2396E" href="mailto:stephane.mottelet@utc.fr"><stephane.mottelet@utc.fr></a><br>
            <b>Sent:</b> Tuesday, February 13, 2018 4:45:41 PM<br>
            <b>To:</b> List dedicated to development questions<br>
            <b>Subject:</b> [Scilab-Dev] Evolution of Scilab API</font>
          <div> </div>
        </div>
      </div>
      <font size="2"><span style="font-size:11pt;">
          <div class="PlainText">Hello,<br>
            <br>
            I am a bit puzzled by the evolution of Scilab api since
            Scilab 5.x <br>
            versions. I have understood that the old stack system has
            dissapeared, <br>
            but now I am very confused because it seems that two
            different ways of <br>
            interfacing C code do exist. For example<br>
            <br>
            #include "api_scilab.h"<br>
            #include <localization.h><br>
            #include <string.h><br>
            #include "Scierror.h"<br>
            int fun(char *fname, void *pvApiCtx)<br>
            <br>
            or<br>
            <br>
            #include "api_scilab.h"<br>
            #include <localization.h><br>
            #include <string.h><br>
            #include "Scierror.h"<br>
            int fun(scilabEnv env, int nin, scilabVar* in, int nopt,
            scilabOpt opt, <br>
            int nout, scilabVar* out)<br>
            <br>
            Is the first snipplet of code above considered as obsolete ?<br>
            <br>
            Thanks for help<br>
            <br>
            S.<br>
            <br>
            <br>
            -- <br>
            Stéphane Mottelet<br>
            Ingénieur de recherche<br>
            EA 4297 Transformations Intégrées de la Matière Renouvelable<br>
            Département Génie des Procédés Industriels<br>
            Sorbonne Universités - Université de Technologie de
            Compiègne<br>
            CS 60319, 60203 Compiègne cedex<br>
            Tel : +33(0)344234688<br>
            <a href="http://www.utc.fr/%7Emottelet"
              moz-do-not-send="true">http://www.utc.fr/~mottelet</a><br>
            <br>
            _______________________________________________<br>
            dev mailing list<br>
            <a class="moz-txt-link-abbreviated" href="mailto:dev@lists.scilab.org">dev@lists.scilab.org</a><br>
            <a href="http://lists.scilab.org/mailman/listinfo/dev"
              moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/dev</a><br>
          </div>
        </span></font>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dev@lists.scilab.org">dev@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/dev">http://lists.scilab.org/mailman/listinfo/dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>