Commit graph

849 commits

Author SHA1 Message Date
Havoc Pennington
aad6fa897f 2005-01-16 Havoc Pennington <hp@redhat.com>
* dbus/dbus-internals.c (_dbus_real_assert): print the function
	name the assertion failed in

	* dbus/dbus-internals.h (_dbus_return_if_fail)
	(_dbus_return_val_if_fail): assert that the name of the function
	containing the check doesn't start with '_', since we only want to
	use checks on public functions

	* dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
	checks to assertions

	* dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
	change checks to asserts for private function

	* dbus/dbus-message.c (_dbus_message_set_serial): checks
	to asserts for private function

	* dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
	broken assertion that was breaking make check
	(_dbus_type_reader_array_is_empty): remove this rather than fix
	it, was only used in assertions
2005-01-17 00:16:28 +00:00
Havoc Pennington
7f9721a6d3 2005-01-16 Havoc Pennington <hp@redhat.com>
* test/unused-code-gc.py: hacky script to find code that's used
	only by the bus (not libdbus) or used only by tests or not used at
	all. It has some false alarms, but looks like we can clean up a
	lot of size from libdbus.

	* dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
	dbus/Makefile.am: initially move 10K of binary size out of libdbus
2005-01-16 22:13:35 +00:00
Havoc Pennington
31988af408 2005-01-16 Havoc Pennington <hp@redhat.com>
* Add and fix docs according to Doxygen warnings throughout
	source.

	* dbus/dbus-marshal-recursive.c
	(_dbus_type_reader_array_is_empty): change this to just call
	array_reader_get_array_len() and make it static

	* dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
	from get_array_type
	(dbus_message_iter_init_append): rename from append_iter_init

	* dbus/dbus-marshal-recursive.c
	(_dbus_type_reader_get_element_type): rename from
	_dbus_type_reader_get_array_type
2005-01-16 15:51:55 +00:00
Havoc Pennington
b3416423b1 2005-01-15 Havoc Pennington <hp@redhat.com>
* test/glib/test-profile.c (with_bus_server_filter): fix crash

	* dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
	when DBUS_DISABLE_ASSERT
	(_dbus_marshal_set_basic): be sure we align for the string length

	* dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
	this look faster

	* dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
	inline macro version
	(_dbus_string_set_byte): provide inline macro version
2005-01-16 02:23:56 +00:00
Havoc Pennington
9c3d566e95 2005-01-15 Havoc Pennington <hp@redhat.com>
* Land the new message args API and type system.

	This patch is huge, but the public API change is not
	really large. The set of D-BUS types has changed somewhat,
	and the arg "getters" are more geared toward language bindings;
	they don't make a copy, etc.

	There are also some known issues. See these emails for details
	on this huge patch:
	http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
        http://lists.freedesktop.org/archives/dbus/2005-January/001922.html

	* dbus/dbus-marshal-*: all the new stuff

	* dbus/dbus-message.c: basically rewritten

	* dbus/dbus-memory.c (check_guards): with "guards" enabled, init
	freed blocks to be all non-nul bytes so using freed memory is less
	likely to work right

	* dbus/dbus-internals.c (_dbus_test_oom_handling): add
	DBUS_FAIL_MALLOC=N environment variable, so you can do
	DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
	DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
	thorough.

	* qt/message.cpp: port to the new message args API
	(operator<<): use str.utf8() rather than str.unicode()
	(pretty sure this is right from the Qt docs?)

	* glib/dbus-gvalue.c: port to the new message args API

	* bus/dispatch.c, bus/driver.c: port to the new message args API

	* dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
	"locked" flag to TRUE and align_offset to 0; I guess we never
	looked at these anyhow, but seems cleaner.

	* dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
	move allocation padding macro to this header; use it to implement
	(_DBUS_STRING_STATIC): ability to declare a static string.

	* dbus/dbus-message.c (_dbus_message_has_type_interface_member):
	change to return TRUE if the interface is not set.

	* dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
	to dbus-marshal-validate.[hc]

	* dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
	dbus-internals.c

	* dbus/Makefile.am: cut over from dbus-marshal.[hc]
	to dbus-marshal-*.[hc]

	* dbus/dbus-object-tree.c (_dbus_decompose_path): move this
	function here from dbus-marshal.c
2005-01-15 07:15:38 +00:00
Joe Shaw
6ec04e917c Update some paths in HACKING 2005-01-13 01:22:04 +00:00
Joe Shaw
3ca8a2794b 2005-01-12 Joe Shaw <joeshaw@novell.com>
* NEWS: Update for 0.23.

	* configure.in: Release 0.23.
2005-01-12 22:55:32 +00:00
Joe Shaw
ce11956e45 2005-01-12 Joe Shaw <joeshaw@novell.com>
* mono/Makefile.am, mono/example/Makefile.am: Always build the
	dbus DLL with --debug.  Clean up after the .mdb files this leaves
	behind.
2005-01-12 22:52:34 +00:00
Joe Shaw
c6adffbbcf 2005-01-12 Joe Shaw <joeshaw@novell.com>
* mono/Makefile.am, mono/example/Makefile.am: Always build the
	dbus DLL with --debug.  Clean up after the .mdb files this leaves
	behind.
2005-01-12 22:48:20 +00:00
Joe Shaw
5d2e90f279 2005-01-12 Joe Shaw <joeshaw@novell.com>
* mono/doc/Makefile.am: Need to uninstall the docs on "make
	uninstall"
2005-01-12 22:41:29 +00:00
Joe Shaw
ddea52aef6 2005-01-12 Joe Shaw <joeshaw@novell.com>
* mono/Makefile.am, mono/example/Makefile.am: Always build the
	dbus DLL with --debug.
2005-01-12 22:34:28 +00:00
Joe Shaw
2388bc86ee 2005-01-12 Joe Shaw <joeshaw@novell.com>
* mono/Makefile.am: Always build the dbus DLL with --debug.

	* mono/Arguments.cs (GetDBusTypeConstructor): If the type
	is an enum, get the enum's underlying type.  Another mono
	1.1.3 fix.
2005-01-12 17:31:08 +00:00
Havoc Pennington
ed3cfaec21 fix doh! in test for double parsing 2005-01-11 22:35:58 +00:00
Joe Shaw
ad03f2672d 2005-01-11 Joe Shaw <joeshaw@novell.com>
Patch from Sjoerd Simons <sjoerd@luon.net>

	* mono/Makefile.am, mono/example/Makefile.am: Don't redefine
	DESTDIR.  It breaks stuff.
2005-01-11 22:09:16 +00:00
Joe Shaw
b3ba709079 2005-01-11 Joe Shaw <joeshaw@novell.com>
Patch from Tambet Ingo <tambet@ximian.com>

	* mono/DBusType/Array.cs (Get): Get the underlying element type by
	calling type.GetElementType().  The code previously depended on
	broken Mono behavior, which was fixed in Mono 1.1.3.

	* mono/DBusType/Dict.cs (constructor): Fix the parameters for
	Activator.CreateInstance() so that the class's constructor is
	called with the right parameters.
2005-01-11 19:59:06 +00:00
Joe Shaw
ac4d2cb464 2005-01-11 Joe Shaw <joeshaw@novell.com>
Patch from Timo Teräs <ext-timo.teras@nokia.com>

	* dbus/dbus-connection.c
	(_dbus_connection_queue_received_message_link): Call
	_dbus_connection_remove_timeout() instead of the _locked()
	variant, since it's always called from
	_dbus_connection_handle_watch(), which handles the locking.
	Removed the _locked() variant since it's no longer used.
2005-01-11 19:31:56 +00:00
Havoc Pennington
72c3ed0630 2005-01-03 Havoc Pennington <hp@redhat.com>
* dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
	return
2005-01-03 17:18:11 +00:00
Havoc Pennington
be2d9b9262 2004-12-26 Havoc Pennington <hp@redhat.com>
* dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
2005-01-03 17:06:35 +00:00
Havoc Pennington
5c486a24e5 add a file to hold the validation routines 2005-01-03 17:05:26 +00:00
Havoc Pennington
07d2fd5aa2 2005-01-03 Havoc Pennington <hp@redhat.com>
* dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
	floating point

	* dbus/dbus-string.c (_dbus_string_insert_alignment): new function
2005-01-03 07:16:12 +00:00
Havoc Pennington
c7e05f9ca4 finish off my TODO list for stuff needed to port dbus-message.c. Next
step is to do so.
2005-01-03 07:15:38 +00:00
Havoc Pennington
ec8e14cfd5 just when the file was looking all beautiful, add horrible hacky code to
fixup array lengths after setting a value somewhere within the array.
2005-01-03 04:25:32 +00:00
Havoc Pennington
f757adc797 cleanup args to read func in test suite 2005-01-03 00:23:03 +00:00
Havoc Pennington
7308a238b2 checkpoint set_variable_length work 2005-01-03 00:01:59 +00:00
Havoc Pennington
2ba05eff37 values-only DBusTypeWriter 2005-01-02 22:13:26 +00:00
Havoc Pennington
401aaa225b minor cleanup 2005-01-02 20:15:01 +00:00
Havoc Pennington
b73cc81c6b clean up the naming of dbus_marshal functions 2005-01-02 19:10:16 +00:00
Havoc Pennington
fed88a4b84 delete some more noise, put args in consistent order (a big bug trap sadly),
and work on the set value stuff some
2005-01-02 08:46:42 +00:00
Havoc Pennington
fb40fedb9e cleanups and fixes 2005-01-02 05:01:07 +00:00
Havoc Pennington
ffd960fc3e implement _dbus_type_writer_write_reader() (to copy a block of values)
which is the first step toward a sane reimplementation of all that delete/modify
and realign nonsense in dbus-message.c
2005-01-02 04:29:52 +00:00
Havoc Pennington
df652bd9a1 change strings to be marshaled consistently with the other basic types (address of the value passed in, so char**) 2005-01-02 02:47:51 +00:00
Havoc Pennington
721e6c7abc make reader const-correct 2005-01-02 02:38:23 +00:00
Havoc Pennington
50103620b3 extend unit test to display progress and to verify that we are inserting not appending in all cases 2005-01-02 02:17:05 +00:00
Havoc Pennington
441907e73a add DBusTypeMark 2005-01-02 00:37:24 +00:00
Havoc Pennington
a6580a5940 2005-01-01 Havoc Pennington <hp@redhat.com>
* configure.in: add -Wfloat-equal
2005-01-01 23:32:45 +00:00
Havoc Pennington
10f0f04980 chop dbus-marshal-basic in half and move it to be insertion rather than append based 2005-01-01 21:05:48 +00:00
Havoc Pennington
e07789e511 voc Pennington <hp@redhat.com>
* dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
	for a variety of reasons '==' doesn't do this.
2005-01-01 20:53:42 +00:00
Havoc Pennington
60a9694974 all types now unit tested and working. 2005-01-01 08:19:28 +00:00
Havoc Pennington
e3ab3b2e84 add more "subclassing" to the test node classes 2005-01-01 03:37:26 +00:00
Havoc Pennington
64e0e91de0 yay, variant values working before the new year. 2005-01-01 03:28:08 +00:00
Havoc Pennington
2bf66111b6 minor tweaking 2005-01-01 02:47:13 +00:00
Havoc Pennington
bb8f518d07 add int64 to test suites, fix minor bug where marshaling assumed that DBusOctets8 was aligned when passed in as a function argument 2005-01-01 02:35:09 +00:00
Havoc Pennington
394d57c765 remove old unit test code, and clean up whitespace 2005-01-01 02:03:50 +00:00
Havoc Pennington
fb93fd5b3f test framework extension 2005-01-01 02:02:32 +00:00
Havoc Pennington
d89d5e41e1 further extend tests 2004-12-31 22:04:27 +00:00
Havoc Pennington
7ae17be411 new test framework in place 2004-12-31 21:08:06 +00:00
Havoc Pennington
c2a98e1103 2004-12-31 Havoc Pennington <hp@redhat.com>
* dbus/dbus-string.c (_dbus_string_equal_substrings): new function
	I keep wishing I had
2004-12-31 21:01:56 +00:00
Havoc Pennington
b16ad22d87 use vtable instead of flags for types only iterators 2004-12-31 00:24:24 +00:00
Havoc Pennington
4f2318345b add "types only" TypeReader, will move to use a vtable instead of a flag in a minute 2004-12-31 00:06:34 +00:00
Havoc Pennington
00999397ce - add variant reader
- further squish the iterator structs
2004-12-30 23:34:23 +00:00