Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GType on arm64 #73

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/vips/cdefs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local ffi = require "ffi"

-- GType is an int the size of a pointer ... I don't think we can just use
-- size_t, sadly
if ffi.arch == "x64" then
if ffi.arch == "x64" or ffi.arch == "arm64" then
ffi.cdef [[
typedef uint64_t GType;
]]
Expand Down Expand Up @@ -92,11 +92,23 @@ ffi.cdef [[
// opaque
} VipsObjectClass;

typedef enum {
G_PARAM_READABLE = 1,
G_PARAM_WRITABLE = 2,
G_PARAM_CONSTRUCT = 4,
G_PARAM_CONSTRUCT_ONLY = 8,
G_PARAM_LAX_VALIDATION = 16,
G_PARAM_STATIC_NAME = 32,
G_PARAM_PRIVATE = G_PARAM_STATIC_NAME,
G_PARAM_STATIC_NICK = 64,
G_PARAM_STATIC_BLURB = 128
} GParamFlags;

typedef struct _GParamSpec {
void *g_type_instance;

const char *name;
unsigned int flags;
GParamFlags flags;
GType value_type;
GType owner_type;

Expand Down
Loading