xkb: make XkbRF_Create() static inline
The function is nothing more than a calloc() call, so we can spare an actual function call here by making it static inline. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1840>
This commit is contained in:
parent
a82fa00835
commit
60d37d0158
|
@ -970,16 +970,6 @@ XkbRF_LoadRules(FILE * file, XkbRF_RulesPtr rules)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
XkbRF_RulesPtr
|
||||
XkbRF_Create(void)
|
||||
{
|
||||
return calloc(1, sizeof(XkbRF_RulesRec));
|
||||
}
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
void
|
||||
XkbRF_Free(XkbRF_RulesPtr rules, Bool freeRules)
|
||||
{
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#define _XSERVER_XKB_XKBRULES_PRIV_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xdefs.h>
|
||||
|
||||
#include "include/xkbrules.h"
|
||||
|
@ -50,7 +51,10 @@ Bool XkbRF_GetComponents(XkbRF_RulesPtr rules,
|
|||
|
||||
Bool XkbRF_LoadRules(FILE *file, XkbRF_RulesPtr rules);
|
||||
|
||||
XkbRF_RulesPtr XkbRF_Create(void);
|
||||
static inline XkbRF_RulesPtr XkbRF_Create(void)
|
||||
{
|
||||
return calloc(1, sizeof(XkbRF_RulesRec));
|
||||
}
|
||||
|
||||
void XkbRF_Free(XkbRF_RulesPtr rules, Bool freeRules);
|
||||
|
||||
|
|
Loading…
Reference in New Issue