mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 15:47:59 +02:00
2004-12-18 Havoc Pennington <hp@redhat.com>
* dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII macro * dbus/dbus-message.c: fix a comment, and add a still-unused not-implemented function * dbus/dbus-marshal.h: fix comment * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
This commit is contained in:
parent
b360305cda
commit
f3228b477d
5 changed files with 33 additions and 4 deletions
12
ChangeLog
12
ChangeLog
|
|
@ -1,3 +1,15 @@
|
|||
2004-12-18 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
|
||||
macro
|
||||
|
||||
* dbus/dbus-message.c: fix a comment, and add a still-unused
|
||||
not-implemented function
|
||||
|
||||
* dbus/dbus-marshal.h: fix comment
|
||||
|
||||
* dbus/dbus-internals.h (_DBUS_ISASCII): new macro
|
||||
|
||||
2004-12-17 Joe Shaw <joeshaw@novell.com>
|
||||
|
||||
* mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
|
||||
|
|
|
|||
|
|
@ -198,6 +198,8 @@ char** _dbus_dup_string_array (const char **array);
|
|||
#undef ABS
|
||||
#define ABS(a) (((a) < 0) ? -(a) : (a))
|
||||
|
||||
#define _DBUS_ISASCII(c) ((c) != '\0' && (((c) & ~0x7f) == 0))
|
||||
|
||||
typedef void (* DBusForeachFunction) (void *element,
|
||||
void *data);
|
||||
|
||||
|
|
|
|||
|
|
@ -345,4 +345,4 @@ dbus_bool_t _dbus_marshal_validate_arg (const DBusString *str,
|
|||
|
||||
dbus_bool_t _dbus_type_is_valid (int typecode);
|
||||
|
||||
#endif /* DBUS_PROTOCOL_H */
|
||||
#endif /* DBUS_MARSHAL_H */
|
||||
|
|
|
|||
|
|
@ -2323,6 +2323,21 @@ dbus_message_append_args (DBusMessage *message,
|
|||
va_end (var_args);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Swap into our byte order if message isn't already.
|
||||
* Done only when required, which allows the bus to avoid
|
||||
* ever doing this as it routes messages.
|
||||
*/
|
||||
static void
|
||||
_dbus_message_ensure_our_byte_order (DBusMessage *message)
|
||||
{
|
||||
if (message->byte_order == DBUS_COMPILER_BYTE_ORDER)
|
||||
return;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -5188,7 +5203,8 @@ decode_string_field (const DBusString *data,
|
|||
/* FIXME because the service/interface/member/error names are already
|
||||
* validated to be in the particular ASCII subset, UTF-8 validating
|
||||
* them could be skipped as a probably-interesting optimization.
|
||||
* The UTF-8 validation definitely shows up in profiles.
|
||||
* The UTF-8 validation shows up in callgrind-type profiles but
|
||||
* not so much in sample/time-based profiles.
|
||||
*/
|
||||
static dbus_bool_t
|
||||
decode_header_data (const DBusString *data,
|
||||
|
|
|
|||
|
|
@ -2394,8 +2394,7 @@ _dbus_string_validate_ascii (const DBusString *str,
|
|||
end = s + len;
|
||||
while (s != end)
|
||||
{
|
||||
if (_DBUS_UNLIKELY (*s == '\0' ||
|
||||
((*s & ~0x7f) != 0)))
|
||||
if (_DBUS_UNLIKELY (!_DBUS_ISASCII (*s)))
|
||||
return FALSE;
|
||||
|
||||
++s;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue