Commit a2262bec authored by Simon McVittie's avatar Simon McVittie

dbus-marshal-recursive: make some internal functions static

Having a disabled type writer, comparing type readers by position, and
performing a single step of copying from a reader to a writer all seem pretty
obscure, and were only used within dbus-marshal-recursive.c (to realign
after insertion).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38285Reviewed-by: default avatarCosimo Alfarano <cosimo.alfarano@collabora.co.uk>
parent de9b34d9
......@@ -32,6 +32,18 @@
* @{
*/
static dbus_bool_t _dbus_type_reader_greater_than (const DBusTypeReader *lhs,
const DBusTypeReader *rhs);
static void _dbus_type_writer_set_enabled (DBusTypeWriter *writer,
dbus_bool_t enabled);
static dbus_bool_t _dbus_type_writer_write_reader_partial (DBusTypeWriter *writer,
DBusTypeReader *reader,
const DBusTypeReader *start_after,
int start_after_new_pos,
int start_after_new_len,
DBusList **fixups);
/** turn this on to get deluged in TypeReader verbose spam */
#define RECURSIVE_MARSHAL_READ_TRACE 0
......@@ -1428,7 +1440,7 @@ _dbus_type_reader_delete (DBusTypeReader *reader,
return retval;
}
/**
/*
* Compares two readers, which must be iterating over the same value data.
* Returns #TRUE if the first parameter is further along than the second parameter.
*
......@@ -1436,7 +1448,7 @@ _dbus_type_reader_delete (DBusTypeReader *reader,
* @param rhs left-hand-side (first) parameter
* @returns whether lhs is greater than rhs
*/
dbus_bool_t
static dbus_bool_t
_dbus_type_reader_greater_than (const DBusTypeReader *lhs,
const DBusTypeReader *rhs)
{
......@@ -2627,7 +2639,7 @@ writer_write_reader_helper (DBusTypeWriter *writer,
return FALSE;
}
/**
/*
* Iterate through all values in the given reader, writing a copy of
* each value to the writer. The reader will be moved forward to its
* end position.
......@@ -2658,7 +2670,7 @@ writer_write_reader_helper (DBusTypeWriter *writer,
* @param fixups list to append #DBusArrayLenFixup if the write was partial
* @returns #FALSE if no memory
*/
dbus_bool_t
static dbus_bool_t
_dbus_type_writer_write_reader_partial (DBusTypeWriter *writer,
DBusTypeReader *reader,
const DBusTypeReader *start_after,
......@@ -2719,7 +2731,7 @@ _dbus_type_writer_write_reader (DBusTypeWriter *writer,
return _dbus_type_writer_write_reader_partial (writer, reader, NULL, 0, 0, NULL);
}
/**
/*
* If disabled, a writer can still be iterated forward and recursed/unrecursed
* but won't write any values. Types will still be written unless the
* writer is a "values only" writer, because the writer needs access to
......@@ -2728,7 +2740,7 @@ _dbus_type_writer_write_reader (DBusTypeWriter *writer,
* @param writer the type writer
* @param enabled #TRUE if values should be written
*/
void
static void
_dbus_type_writer_set_enabled (DBusTypeWriter *writer,
dbus_bool_t enabled)
{
......
......@@ -129,8 +129,6 @@ dbus_bool_t _dbus_type_reader_set_basic (DBusTypeReader *
const DBusTypeReader *realign_root);
dbus_bool_t _dbus_type_reader_delete (DBusTypeReader *reader,
const DBusTypeReader *realign_root);
dbus_bool_t _dbus_type_reader_greater_than (const DBusTypeReader *lhs,
const DBusTypeReader *rhs);
dbus_bool_t _dbus_type_reader_equal_values (const DBusTypeReader *lhs,
const DBusTypeReader *rhs);
......@@ -178,14 +176,6 @@ dbus_bool_t _dbus_type_writer_append_array (DBusTypeWriter *write
DBusTypeWriter *sub);
dbus_bool_t _dbus_type_writer_write_reader (DBusTypeWriter *writer,
DBusTypeReader *reader);
dbus_bool_t _dbus_type_writer_write_reader_partial (DBusTypeWriter *writer,
DBusTypeReader *reader,
const DBusTypeReader *start_after,
int start_after_new_pos,
int start_after_new_len,
DBusList **fixups);
void _dbus_type_writer_set_enabled (DBusTypeWriter *writer,
dbus_bool_t enabled);
#endif /* DBUS_MARSHAL_RECURSIVE_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment