openbsd-ports/devel/opencm/patches.nogc/patch-base_src_common_Mutable_c
todd 31057a08c0 update to 0.1.2alpha5pl2 from 0.1.0alpha18
see http://www.opencm.org/news.html for hilights of this update, major
noteworthy changes include:

- sxd has gone away, gzfs is 'interim' while 'sxd2' is almost ready
- if you have an old sxd repository, read the mailing list archives for
  how to update (use an interum version)
- an incompatible update to the server/client protocol requires that you
  update both at the same time

(as a reminder, this is 'alpha' and as such is subject to incompatible changes
 like the above.  expect more to come when sxd2 emerges)

Also, add a 'nogc' flavor that removes the dependency on boehm-gc, at the
cost of not free()'ing all memory allocated (read: at the moment, most).
2003-05-23 13:22:14 +00:00

39 lines
1.3 KiB
Plaintext

$OpenBSD: patch-base_src_common_Mutable_c,v 1.1 2003/05/23 13:22:14 todd Exp $
--- base/src/common/Mutable.c.orig Sat Mar 29 16:15:29 2003
+++ base/src/common/Mutable.c Thu May 22 17:46:42 2003
@@ -43,7 +43,7 @@
Mutable *
mutable_create(const char *name, const char *desc)
{
- Mutable *m = (Mutable *) GC_MALLOC(sizeof(Mutable));
+ Mutable *m = (Mutable *) malloc(sizeof(Mutable));
ser_init(m, &Mutable_SerType, Mutable_SerType.ver);
SER_MODIFIED(m);
@@ -134,10 +134,14 @@ void
mutable_show(const void *ob)
{
const Mutable *m = ob;
+ char *xstr;
report(0, "URI: %s\n", m->uri);
- report(0, "Sequence No: %s\n", xunsigned64_str(m->seqNo));
- report(0, "nRevisions: %s\n", xunsigned64_str(m->nRevisions));
+ xstr = xunsigned64_str(m->seqNo);
+ report(0, "Sequence No: %s\n", xstr);
+ free(xstr);
+ xstr = xunsigned64_str(m->nRevisions);
+ report(0, "nRevisions: %s\n", xstr);
report(0, "Read Group: %s\n", m->readGroupURI);
report(0, "Mod Group: %s\n", m->modGroupURI);
report(0, "Notify: %s\n", m->notify);
@@ -174,7 +178,7 @@ mutable_deserialize(const DeserializeInf
{
URI *uri;
const char *temp;
- Mutable *m = (Mutable *) GC_MALLOC(sizeof(Mutable));
+ Mutable *m = (Mutable *) malloc(sizeof(Mutable));
ser_init(m, &Mutable_SerType, di->ver);