mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-06-11 02:28:05 +00:00
libfprint: Use a macro to easily compute TOD padding
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "tod/tod-macros.h"
|
||||
|
||||
typedef struct _FpDevice FpDevice;
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -43,7 +43,7 @@ struct _FpIdEntryTODV1_90_1
|
||||
|
||||
/*< private >*/
|
||||
/* padding for future expansion */
|
||||
gpointer _padding_dummy[16];
|
||||
TOD_PADDING (16, 0);
|
||||
};
|
||||
|
||||
struct _FpDeviceClassTODV1_90_1
|
||||
@@ -78,7 +78,7 @@ struct _FpDeviceClassTODV1_90_1
|
||||
|
||||
/*< private >*/
|
||||
/* padding for future expansion */
|
||||
gpointer _padding_dummy[32];
|
||||
TOD_PADDING (32, 0);
|
||||
};
|
||||
|
||||
typedef struct _FpDeviceClassTODV1_90_1 FpDeviceClassTODV1_90_1;
|
||||
@@ -172,13 +172,9 @@ struct _FpIdEntryTODV1_92_0
|
||||
|
||||
/*< private >*/
|
||||
/* padding for future expansion */
|
||||
#if GLIB_SIZEOF_VOID_P == 8
|
||||
gpointer _padding_dummy[13];
|
||||
#elif GLIB_SIZEOF_VOID_P == 4
|
||||
gpointer _padding_dummy[11];
|
||||
#else
|
||||
G_STATIC_ASSERT("Unexpected pointer size")
|
||||
#endif
|
||||
TOD_PADDING_ALIGNED (16, sizeof (guint) * 2 +
|
||||
sizeof (FpiDeviceUdevSubtypeFlagsTODV1_92_0) +
|
||||
sizeof (gpointer));
|
||||
};
|
||||
|
||||
typedef struct _FpIdEntryTODV1_92_0 FpIdEntryTODV1_92_0;
|
||||
@@ -217,7 +213,7 @@ struct _FpDeviceClassTODV1_92_0
|
||||
|
||||
/*< private >*/
|
||||
/* padding for future expansion */
|
||||
gpointer _padding_dummy[31];
|
||||
TOD_PADDING (32, sizeof (FpDeviceFeatureTODV1_92_0));
|
||||
};
|
||||
|
||||
typedef struct _FpDeviceClassTODV1_92_0 FpDeviceClassTODV1_92_0;
|
||||
@@ -266,13 +262,10 @@ struct _FpDeviceClassTODV1_94_0
|
||||
|
||||
/*< private >*/
|
||||
/* padding for future expansion */
|
||||
#if GLIB_SIZEOF_VOID_P == 8
|
||||
gpointer _padding_dummy[27];
|
||||
#elif GLIB_SIZEOF_VOID_P == 4
|
||||
gpointer _padding_dummy[26];
|
||||
#else
|
||||
G_STATIC_ASSERT("Unexpected pointer size")
|
||||
#endif
|
||||
TOD_PADDING_ALIGNED8 (32,
|
||||
sizeof (FpDeviceFeatureTODV1_94_0) +
|
||||
sizeof (gint32) * 2 +
|
||||
sizeof (gpointer) * 3)
|
||||
};
|
||||
|
||||
typedef struct _FpDeviceClassTODV1_94_0 FpDeviceClassTODV1_94_0;
|
||||
|
||||
@@ -57,5 +57,5 @@ typedef struct _FpImageDeviceClassTODV1_90_1
|
||||
|
||||
/*< private >*/
|
||||
/* padding for future expansion */
|
||||
gpointer _padding_dummy[32];
|
||||
TOD_PADDING (32, 0);
|
||||
} FpImageDeviceClassTODV1_90_1;
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "tod/tod-macros.h"
|
||||
|
||||
typedef struct _FpImage FpImage;
|
||||
typedef struct _FpImageTODV1_90_1 FpImageTODV1_90_1;
|
||||
|
||||
@@ -58,5 +60,5 @@ struct _FpImageTODV1_90_1
|
||||
GPtrArray *minutiae;
|
||||
guint ref_count;
|
||||
|
||||
gpointer _padding_dummy[32];
|
||||
TOD_PADDING (32, 0);
|
||||
};
|
||||
|
||||
@@ -56,5 +56,5 @@ struct _FpiSpiTransferTODV1_92_0
|
||||
GDestroyNotify free_buffer_rd;
|
||||
|
||||
/* padding for future expansion */
|
||||
gpointer _padding_dummy[32];
|
||||
TOD_PADDING (32, 0);
|
||||
};
|
||||
|
||||
@@ -75,7 +75,6 @@ struct _FpiUsbTransferTODV1_90_1
|
||||
/* Data free function */
|
||||
GDestroyNotify free_buffer;
|
||||
|
||||
/*< private >*/
|
||||
/* padding for future expansion */
|
||||
gpointer _padding_dummy[32];
|
||||
TOD_PADDING (32, 0);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user