Inconsistency between libbonobo's PersistFile and PersistStream implementations
- From: ERDI Gergo <cactus cactus rulez org>
- To: gnome-components-list gnome org
- Subject: Inconsistency between libbonobo's PersistFile and PersistStream implementations
- Date: Sun, 31 Dec 2000 15:24:24 +0100 (CET)
Hi,
just a minor syntaxic nitpicking: the implementor functions of PersistFile
have the signature of
typedef int (*BonoboPersistFileIOFn) (BonoboPersistFile *pf,
const CORBA_char *filename,
CORBA_Environment *ev,
void *closure);
but the functiosn of PersistStream have
typedef void (*BonoboPersistStreamIOFn) (BonoboPersistStream *ps,
const Bonobo_Stream stream,
Bonobo_Persist_ContentType type,
void *closure,
CORBA_Environment *ev);
Here's a patch to bring consistency (attached). Shall I commit it?
--
.--= ULLA! =----------------------------. finger cactus cactus rulez org
\ http://cactus.rulez.org \ for PGP public key
`----------= cactus cactus rulez org =--'
Phillistines demand David be tested for steroids.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/bonobo/ChangeLog,v
retrieving revision 1.860
diff -u -r1.860 ChangeLog
--- ChangeLog 2000/12/29 18:39:25 1.860
+++ ChangeLog 2000/12/31 14:23:49
@@ -1,3 +1,8 @@
+2000-12-31 ERDI Gergo <cactus cactus rulez org>
+
+ * bonobo/bonobo-persist-stream.[ch]: Change the order of arguments
+ in the implementation functions to match that of bonobo-persist-file.
+
2000-12-29 Michael Meeks <michael helixcode com>
* bonobo/bonobo-event-source.c: Include listener to kill warning.
Index: bonobo/bonobo-persist-stream.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-persist-stream.c,v
retrieving revision 1.34
diff -u -r1.34 bonobo-persist-stream.c
--- bonobo/bonobo-persist-stream.c 2000/12/24 17:26:18 1.34
+++ bonobo/bonobo-persist-stream.c 2000/12/31 14:23:50
@@ -39,7 +39,7 @@
BonoboPersistStream *ps = BONOBO_PERSIST_STREAM (object);
if (ps->load_fn != NULL)
- (*ps->load_fn)(ps, stream, type, ps->closure, ev);
+ (*ps->load_fn)(ps, stream, type, ev, ps->closure);
else {
GtkObjectClass *oc = GTK_OBJECT (ps)->klass;
BonoboPersistStreamClass *class = BONOBO_PERSIST_STREAM_CLASS (oc);
@@ -63,7 +63,7 @@
BonoboPersistStream *ps = BONOBO_PERSIST_STREAM (object);
if (ps->save_fn != NULL)
- (*ps->save_fn)(ps, stream, type, ps->closure, ev);
+ (*ps->save_fn)(ps, stream, type, ev, ps->closure);
else {
GtkObjectClass *oc = GTK_OBJECT (ps)->klass;
BonoboPersistStreamClass *class = BONOBO_PERSIST_STREAM_CLASS (oc);
@@ -89,7 +89,7 @@
if (ps->max_fn != NULL)
- return (*ps->max_fn)(ps, ps->closure, ev);
+ return (*ps->max_fn)(ps, ev, ps->closure);
return (*class->get_size_max)(BONOBO_PERSIST_STREAM (object), ev);
}
@@ -135,7 +135,7 @@
BonoboPersistStream *ps = BONOBO_PERSIST_STREAM (persist);
if (ps->types_fn)
- return ps->types_fn (ps, ps->closure, ev);
+ return ps->types_fn (ps, ev, ps->closure);
else
return bonobo_persist_generate_content_types (1, "");
}
Index: bonobo/bonobo-persist-stream.h
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-persist-stream.h,v
retrieving revision 1.18
diff -u -r1.18 bonobo-persist-stream.h
--- bonobo/bonobo-persist-stream.h 2000/12/04 07:21:32 1.18
+++ bonobo/bonobo-persist-stream.h 2000/12/31 14:23:50
@@ -27,16 +27,16 @@
typedef void (*BonoboPersistStreamIOFn) (BonoboPersistStream *ps,
const Bonobo_Stream stream,
Bonobo_Persist_ContentType type,
- void *closure,
- CORBA_Environment *ev);
+ CORBA_Environment *ev,
+ void *closure);
typedef CORBA_long (*BonoboPersistStreamMaxFn) (BonoboPersistStream *ps,
- void *closure,
- CORBA_Environment *ev);
+ CORBA_Environment *ev,
+ void *closure);
typedef Bonobo_Persist_ContentTypeList * (*BonoboPersistStreamTypesFn) (BonoboPersistStream *ps,
- void *closure,
- CORBA_Environment *ev);
+ CORBA_Environment *ev,
+ void *closure);
struct _BonoboPersistStream {
BonoboPersist persist;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]