Mailing List Archive

r3639 - in trunk: c_src/KinoSearch/Util perl/lib/KinoSearch/Util
Author: creamyg
Date: 2008-07-27 13:55:43 -0700 (Sun, 27 Jul 2008)
New Revision: 3639

Modified:
trunk/c_src/KinoSearch/Util/ByteBuf.bp
trunk/c_src/KinoSearch/Util/ByteBuf.c
trunk/perl/lib/KinoSearch/Util/ByteBuf.pm
Log:
Remove vestigial class ZombieByteBuf.


Modified: trunk/c_src/KinoSearch/Util/ByteBuf.bp
===================================================================
--- trunk/c_src/KinoSearch/Util/ByteBuf.bp 2008-07-27 20:13:08 UTC (rev 3638)
+++ trunk/c_src/KinoSearch/Util/ByteBuf.bp 2008-07-27 20:55:43 UTC (rev 3639)
@@ -149,27 +149,6 @@
Destroy(ViewByteBuf *self);
}

-/** A ByteBuf that cannot be destroyed.
- *
- * This class solves an esoteric problem. It is possible for a
- * stack-allocated ByteBuf to be wrapped via a heap-allocated native object,
- * and for that native object to persist beyond the life of the stack object
- * in the event of an exception. If that happens, the native destructor will
- * attempt to call the ByteBuf's Destroy() -- but that ByteBuf is no longer
- * valid, since the stack was cleaned up a while back.
- *
- * The solution is to have a class specifically dedicated to stack allocation,
- * for which the native destructor is a no-op.
- */
-class KinoSearch::Util::ZombieByteBuf cnick ZBB
- extends KinoSearch::Util::ViewByteBuf {
-
- /** Throws an error.
- */
- void
- Destroy(ZombieByteBuf *self);
-}
-
__C__

#define KINO_BBEND(self) ((self)->ptr + (self)->len)

Modified: trunk/c_src/KinoSearch/Util/ByteBuf.c
===================================================================
--- trunk/c_src/KinoSearch/Util/ByteBuf.c 2008-07-27 20:13:08 UTC (rev 3638)
+++ trunk/c_src/KinoSearch/Util/ByteBuf.c 2008-07-27 20:55:43 UTC (rev 3639)
@@ -303,15 +303,6 @@
FREE_OBJ(self);
}

-/******************************************************************/
-
-void
-ZBB_destroy(ZombieByteBuf *self)
-{
- UNUSED_VAR(self);
- CONFESS("Illegal attempt to destroy ZombieByteBuf");
-}
-
/* Copyright 2007-2008 Marvin Humphrey
*
* This program is free software; you can redistribute it and/or modify

Modified: trunk/perl/lib/KinoSearch/Util/ByteBuf.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Util/ByteBuf.pm 2008-07-27 20:13:08 UTC (rev 3638)
+++ trunk/perl/lib/KinoSearch/Util/ByteBuf.pm 2008-07-27 20:55:43 UTC (rev 3639)
@@ -12,11 +12,6 @@

sub new { confess "ViewByteBuf objects can only be created from C." }

-package KinoSearch::Util::ZombieByteBuf;
-BEGIN { our @ISA = qw( KinoSearch::Util::ViewByteBuf ); }
-
-sub DESTROY { }
-
1;

__END__


_______________________________________________
kinosearch-commits mailing list
kinosearch-commits@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch-commits