mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
alignment: set alignment on structs
This uses an alternate idea for setting the structure alignments. Lets see if this silents the ARM builder cast alignment issues. GSlice (which is what is used for GObjects) guarantees a 2-pointer size allocation, which means we can be ensured that the alignment is at least 8 bytes.
This commit is contained in:
@ -32,7 +32,7 @@ struct _SpZoomManager
|
||||
gdouble min_zoom;
|
||||
gdouble max_zoom;
|
||||
gdouble zoom;
|
||||
} __attribute__((aligned(8)));
|
||||
};
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
@ -108,7 +108,7 @@ sp_zoom_manager_get_property (GObject *object,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
SpZoomManager *self = (SpZoomManager *)object;
|
||||
SpZoomManager *self = SP_ZOOM_MANAGER (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
@ -143,7 +143,7 @@ sp_zoom_manager_set_property (GObject *object,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
SpZoomManager *self = (SpZoomManager *)object;
|
||||
SpZoomManager *self = SP_ZOOM_MANAGER (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user