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

[POC] xkbcomp: allocate AST nodes using bump allocator #616

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
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
40 changes: 20 additions & 20 deletions include/xkbcommon/xkbcommon-compose.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ enum xkb_compose_format {
*
* @memberof xkb_compose_table
*/
struct xkb_compose_table *
XKB_EXPORT struct xkb_compose_table *
xkb_compose_table_new_from_locale(struct xkb_context *context,
const char *locale,
enum xkb_compose_compile_flags flags);
Expand All @@ -256,7 +256,7 @@ xkb_compose_table_new_from_locale(struct xkb_context *context,
*
* @memberof xkb_compose_table
*/
struct xkb_compose_table *
XKB_EXPORT struct xkb_compose_table *
xkb_compose_table_new_from_file(struct xkb_context *context,
FILE *file,
const char *locale,
Expand All @@ -272,7 +272,7 @@ xkb_compose_table_new_from_file(struct xkb_context *context,
* @see xkb_compose_table_new_from_file()
* @memberof xkb_compose_table
*/
struct xkb_compose_table *
XKB_EXPORT struct xkb_compose_table *
xkb_compose_table_new_from_buffer(struct xkb_context *context,
const char *buffer, size_t length,
const char *locale,
Expand All @@ -286,7 +286,7 @@ xkb_compose_table_new_from_buffer(struct xkb_context *context,
*
* @memberof xkb_compose_table
*/
struct xkb_compose_table *
XKB_EXPORT struct xkb_compose_table *
xkb_compose_table_ref(struct xkb_compose_table *table);

/**
Expand All @@ -296,7 +296,7 @@ xkb_compose_table_ref(struct xkb_compose_table *table);
*
* @memberof xkb_compose_table
*/
void
XKB_EXPORT void
xkb_compose_table_unref(struct xkb_compose_table *table);

/**
Expand Down Expand Up @@ -332,7 +332,7 @@ struct xkb_compose_table_entry;
* @memberof xkb_compose_table_entry
* @since 1.6.0
*/
const xkb_keysym_t *
XKB_EXPORT const xkb_keysym_t *
xkb_compose_table_entry_sequence(struct xkb_compose_table_entry *entry,
size_t *sequence_length);

Expand All @@ -353,7 +353,7 @@ xkb_compose_table_entry_sequence(struct xkb_compose_table_entry *entry,
* @memberof xkb_compose_table_entry
* @since 1.6.0
*/
xkb_keysym_t
XKB_EXPORT xkb_keysym_t
xkb_compose_table_entry_keysym(struct xkb_compose_table_entry *entry);

/**
Expand All @@ -375,7 +375,7 @@ xkb_compose_table_entry_keysym(struct xkb_compose_table_entry *entry);
* @memberof xkb_compose_table_entry
* @since 1.6.0
*/
const char *
XKB_EXPORT const char *
xkb_compose_table_entry_utf8(struct xkb_compose_table_entry *entry);

/**
Expand Down Expand Up @@ -407,7 +407,7 @@ struct xkb_compose_table_iterator;
* @sa xkb_compose_table_iterator_free()
* @since 1.6.0
*/
struct xkb_compose_table_iterator *
XKB_EXPORT struct xkb_compose_table_iterator *
xkb_compose_table_iterator_new(struct xkb_compose_table *table);

/**
Expand All @@ -416,7 +416,7 @@ xkb_compose_table_iterator_new(struct xkb_compose_table *table);
* @memberof xkb_compose_table_iterator
* @since 1.6.0
*/
void
XKB_EXPORT void
xkb_compose_table_iterator_free(struct xkb_compose_table_iterator *iter);

/**
Expand All @@ -433,7 +433,7 @@ xkb_compose_table_iterator_free(struct xkb_compose_table_iterator *iter);
* @memberof xkb_compose_table_iterator
* @since 1.6.0
*/
struct xkb_compose_table_entry *
XKB_EXPORT struct xkb_compose_table_entry *
xkb_compose_table_iterator_next(struct xkb_compose_table_iterator *iter);

/** Flags for compose state creation. */
Expand All @@ -454,7 +454,7 @@ enum xkb_compose_state_flags {
*
* @memberof xkb_compose_state
*/
struct xkb_compose_state *
XKB_EXPORT struct xkb_compose_state *
xkb_compose_state_new(struct xkb_compose_table *table,
enum xkb_compose_state_flags flags);

Expand All @@ -465,7 +465,7 @@ xkb_compose_state_new(struct xkb_compose_table *table,
*
* @memberof xkb_compose_state
*/
struct xkb_compose_state *
XKB_EXPORT struct xkb_compose_state *
xkb_compose_state_ref(struct xkb_compose_state *state);

/**
Expand All @@ -475,7 +475,7 @@ xkb_compose_state_ref(struct xkb_compose_state *state);
*
* @memberof xkb_compose_state
*/
void
XKB_EXPORT void
xkb_compose_state_unref(struct xkb_compose_state *state);

/**
Expand All @@ -490,7 +490,7 @@ xkb_compose_state_unref(struct xkb_compose_state *state);
*
* @memberof xkb_compose_state
*/
struct xkb_compose_table *
XKB_EXPORT struct xkb_compose_table *
xkb_compose_state_get_compose_table(struct xkb_compose_state *state);

/** Status of the Compose sequence state machine. */
Expand Down Expand Up @@ -558,7 +558,7 @@ enum xkb_compose_feed_result {
*
* @memberof xkb_compose_state
*/
enum xkb_compose_feed_result
XKB_EXPORT enum xkb_compose_feed_result
xkb_compose_state_feed(struct xkb_compose_state *state,
xkb_keysym_t keysym);

Expand All @@ -570,7 +570,7 @@ xkb_compose_state_feed(struct xkb_compose_state *state,
*
* @memberof xkb_compose_state
*/
void
XKB_EXPORT void
xkb_compose_state_reset(struct xkb_compose_state *state);

/**
Expand All @@ -579,7 +579,7 @@ xkb_compose_state_reset(struct xkb_compose_state *state);
* @see xkb_compose_status
* @memberof xkb_compose_state
**/
enum xkb_compose_status
XKB_EXPORT enum xkb_compose_status
xkb_compose_state_get_status(struct xkb_compose_state *state);

/**
Expand Down Expand Up @@ -610,7 +610,7 @@ xkb_compose_state_get_status(struct xkb_compose_state *state);
*
* @memberof xkb_compose_state
**/
int
XKB_EXPORT int
xkb_compose_state_get_utf8(struct xkb_compose_state *state,
char *buffer, size_t size);

Expand All @@ -625,7 +625,7 @@ xkb_compose_state_get_utf8(struct xkb_compose_state *state,
*
* @memberof xkb_compose_state
**/
xkb_keysym_t
XKB_EXPORT xkb_keysym_t
xkb_compose_state_get_one_sym(struct xkb_compose_state *state);

/** @} */
Expand Down
8 changes: 4 additions & 4 deletions include/xkbcommon/xkbcommon-x11.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ enum xkb_x11_setup_xkb_extension_flags {
*
* @returns 1 on success, or 0 on failure.
*/
int
XKB_EXPORT int
xkb_x11_setup_xkb_extension(xcb_connection_t *connection,
uint16_t major_xkb_version,
uint16_t minor_xkb_version,
Expand All @@ -181,7 +181,7 @@ xkb_x11_setup_xkb_extension(xcb_connection_t *connection,
* @returns A device ID which may be used with other xkb_x11_* functions,
* or -1 on failure.
*/
int32_t
XKB_EXPORT int32_t
xkb_x11_get_core_keyboard_device_id(xcb_connection_t *connection);

/**
Expand All @@ -206,7 +206,7 @@ xkb_x11_get_core_keyboard_device_id(xcb_connection_t *connection);
*
* @memberof xkb_keymap
*/
struct xkb_keymap *
XKB_EXPORT struct xkb_keymap *
xkb_x11_keymap_new_from_device(struct xkb_context *context,
xcb_connection_t *connection,
int32_t device_id,
Expand All @@ -230,7 +230,7 @@ xkb_x11_keymap_new_from_device(struct xkb_context *context,
*
* @memberof xkb_state
*/
struct xkb_state *
XKB_EXPORT struct xkb_state *
xkb_x11_state_new_from_device(struct xkb_keymap *keymap,
xcb_connection_t *connection,
int32_t device_id);
Expand Down
Loading
Loading