403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.70.147.4
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/swig4.0/scilab/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/swig4.0/scilab/scisequencepointer.swg
/*
 *
 * Scilab list of pointer <-> C++ pointer container
 *
 */

%include <scilist.swg>

%fragment("<stdint.h>", "header") {
%#include <stdint.h>
}

%fragment(SWIG_AsCheck_Sequence_frag(ptr), "header",
  fragment="SWIG_ScilabList") {

SWIGINTERN int
SWIG_AsCheck_Sequence_dec(ptr)(SwigSciObject obj) {
  return SWIG_CheckScilabList(obj);
}
}

%fragment(SWIG_AsGet_Sequence_frag(ptr), "header",
  fragment="SWIG_ScilabList") {

SWIGINTERN int
SWIG_AsGet_Sequence_dec(ptr)(SwigSciObject obj, int **piSequence) {
  return SWIG_GetScilabList(obj, piSequence);
}
}

%fragment(SWIG_AsSize_Sequence_frag(ptr), "header",
  fragment="SWIG_ScilabList") {

SWIGINTERN int
SWIG_AsSize_Sequence_dec(ptr)(SwigSciObject obj, int *piSize) {
  return SWIG_GetScilabListSize(obj, piSize);
}
}

%fragment(SWIG_FromCreate_Sequence_frag(ptr), "header",
  fragment="<stdint.h>") {

SWIGINTERN int
SWIG_FromCreate_Sequence_dec(ptr)(int size, uintptr_t **pSequence) {
  *pSequence = new uintptr_t[size];
  return *pSequence != NULL ? SWIG_OK : SWIG_ERROR;
}
}

%fragment(SWIG_FromSet_Sequence_frag(ptr), "header",
  fragment="<stdint.h>") {

SWIGINTERN SwigSciObject
SWIG_FromSet_Sequence_dec(ptr)(int size, uintptr_t *pSequence) {
  SciErr sciErr;
  int *piListAddr;

  int iVarOut = SWIG_NbInputArgument(pvApiCtx) + SWIG_Scilab_GetOutputPosition();

  sciErr = createList(pvApiCtx, iVarOut, size, &piListAddr);
  if (sciErr.iErr) {
    printError(&sciErr, 0);
    return SWIG_ERROR;
  }

  for (int i=0; i<size; i++) {
    sciErr = createPointerInList(pvApiCtx, iVarOut, piListAddr, i + 1, (void *)pSequence[i]);
    if (sciErr.iErr) {
      printError(&sciErr, 0);
      return SWIG_ERROR;
    }
  }
  delete (int*)pSequence;
  return SWIG_OK;
}
}

%fragment(SWIG_AsVal_SequenceItem_frag(ptr), "header") {

SWIGINTERN void*
SWIG_AsVal_SequenceItem_dec(ptr)(SwigSciObject obj, int *piSequence, int itemIndex)
{
  SciErr sciErr;
  int *piItemAddr;
  int iType;
  void* pItemValue = NULL;

  sciErr = getListItemAddress(pvApiCtx, piSequence, itemIndex + 1, &piItemAddr);
  if (sciErr.iErr) {
    printError(&sciErr, 0);
    return NULL;
  }

  sciErr = getVarType(pvApiCtx, piItemAddr, &iType);
  if (sciErr.iErr) {
    printError(&sciErr, 0);
    return NULL;
  }

  if (iType != sci_pointer) {
    Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A pointer is expected at list item #%d.\n"), SWIG_Scilab_GetFuncName(), obj, itemIndex + 1);
    return NULL;
  }

  sciErr = getPointerInList(pvApiCtx, piSequence, itemIndex + 1, &pItemValue);
  if (sciErr.iErr) {
    printError(&sciErr, 0);
    return NULL;
  }

  return pItemValue;
}
}

%fragment(SWIG_From_SequenceItem_frag(ptr), "header",
  fragment="<stdint.h>") {

SWIGINTERN int
SWIG_From_SequenceItem_dec(ptr)(uintptr_t *pSequence, int iItemIndex, uintptr_t itemValue) {
  pSequence[iItemIndex] = itemValue;
  return SWIG_OK;
}
}

Youez - 2016 - github.com/yon3zu
LinuXploit