unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* freeing fports
@ 2003-08-27  4:56 Aaron VanDevender
  2003-09-23 23:49 ` Kevin Ryde
  0 siblings, 1 reply; 3+ messages in thread
From: Aaron VanDevender @ 2003-08-27  4:56 UTC (permalink / raw)


I noticed that the fport free function doesn't return how much
it frees. This patch should take care of that.

--- libguile.old/fports.c       2003-08-26 23:35:34.000000000 -0500
+++ libguile/fports.c   2003-08-26 23:47:23.000000000 -0500
@@ -827,8 +827,11 @@
 static size_t
 fport_free (SCM port)
 {
+  size_t size;
+  scm_t_port *pt = SCM_PTAB_ENTRY (port);
+  size = pt->read_buf_size + pt->write_buf_size + sizeof(scm_t_fport);
   fport_close (port);
-  return 0;
+  return size;
 }
  
 static scm_t_bits



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-24 18:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-27  4:56 freeing fports Aaron VanDevender
2003-09-23 23:49 ` Kevin Ryde
2003-09-24 18:06   ` Aaron VanDevender

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).