mcpp index

compat.libffi

#include

libffi — portable foreign function interface, built from the upstream release

#include <ffi.h>
mcpp add compat.libffi@3.4.8

用法

來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。

// compat.libffi — behavioral test. It does not check that symbols exist; it
// builds a call frame at runtime and invokes through it, which is the only
// thing that proves the per-ABI assembly was assembled and linked correctly.
// A wrong or missing unix64.S links fine and segfaults here.

#ifdef __linux__

#include <ffi.h>

#include <dlfcn.h>
#include <cstdio>
#include <cstring>
#include <string>

namespace {

int failures = 0;

void check(bool ok, const char *what)
{
    std::printf("%-58s %s\n", what, ok ? "ok" : "FAILED");
    if (!ok) ++failures;
// …

tests/examples/libffi/tests/ffi.cpp · 專案 tests/examples/libffi

建置

targets
ffi (shared)
language
c++23
C standard
c11
import std
no
include dirs
include, src

原始檔 (12)

  • src/prep_cif.c
  • src/types.c
  • src/raw_api.c
  • src/java_raw_api.c
  • src/closures.c
  • src/tramp.c
  • src/x86/ffi.c
  • src/x86/ffi64.c
  • src/x86/ffiw64.c
  • src/x86/sysv.S
  • src/x86/unix64.S
  • src/x86/win64.S

產生的檔案

  • include/fficonfig.h

版本

版本平台 鏡像sha256
3.4.8 最新 Linux GLOBAL CN bc9842a18898…