< prev index next >

modules/javafx.media/src/main/native/gstreamer/3rd_party/libffi/src/raw_api.c

Print this page
*** 27,10 ***
--- 27,14 ---
  /* This file defines generic functions for use with the raw api. */
  
  #include <ffi.h>
  #include <ffi_common.h>
  
+ #ifdef GSTREAMER_LITE
+ #include <string.h>
+ #endif // GSTREAMER_LITE
+ 
  #if !FFI_NO_RAW_API
  
  size_t
  ffi_raw_size (ffi_cif *cif)
  {

*** 41,14 ***
  
    for (i = cif->nargs-1; i >= 0; i--, at++)
      {
  #if !FFI_NO_STRUCTS
        if ((*at)->type == FFI_TYPE_STRUCT)
!     result += ALIGN (sizeof (void*), FFI_SIZEOF_ARG);
        else
  #endif
!     result += ALIGN ((*at)->size, FFI_SIZEOF_ARG);
      }
  
    return result;
  }
  
--- 45,14 ---
  
    for (i = cif->nargs-1; i >= 0; i--, at++)
      {
  #if !FFI_NO_STRUCTS
        if ((*at)->type == FFI_TYPE_STRUCT)
!     result += FFI_ALIGN (sizeof (void*), FFI_SIZEOF_ARG);
        else
  #endif
!     result += FFI_ALIGN ((*at)->size, FFI_SIZEOF_ARG);
      }
  
    return result;
  }
  

*** 96,11 ***
        *args = (void*) &(raw++)->ptr;
        break;
  
      default:
        *args = raw;
!       raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
      }
      }
  
  #else /* WORDS_BIGENDIAN */
  
--- 100,11 ---
        *args = (void*) &(raw++)->ptr;
        break;
  
      default:
        *args = raw;
!       raw += FFI_ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
      }
      }
  
  #else /* WORDS_BIGENDIAN */
  

*** 121,11 ***
        *args = (raw++)->ptr;
      }
        else
      {
        *args = (void*) raw;
!       raw += ALIGN ((*tp)->size, sizeof (void*)) / sizeof (void*);
      }
      }
  
  #else
  #error "pdp endian not supported"
--- 125,11 ---
        *args = (raw++)->ptr;
      }
        else
      {
        *args = (void*) raw;
!       raw += FFI_ALIGN ((*tp)->size, sizeof (void*)) / sizeof (void*);
      }
      }
  
  #else
  #error "pdp endian not supported"

*** 184,11 ***
        (raw++)->ptr = **(void***) args;
        break;
  
      default:
        memcpy ((void*) raw->data, (void*)*args, (*tp)->size);
!       raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
      }
      }
  }
  
  #if !FFI_NATIVE_RAW_API
--- 188,11 ---
        (raw++)->ptr = **(void***) args;
        break;
  
      default:
        memcpy ((void*) raw->data, (void*)*args, (*tp)->size);
!       raw += FFI_ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
      }
      }
  }
  
  #if !FFI_NATIVE_RAW_API
< prev index next >