unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Aaron VanDevender <sig@netdot.net>
Subject: freeing fports
Date: Wed, 27 Aug 2003 00:56:21 -0400	[thread overview]
Message-ID: <20030827005621.T1574@netdot.net> (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


             reply	other threads:[~2003-08-27  4:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-27  4:56 Aaron VanDevender [this message]
2003-09-23 23:49 ` freeing fports Kevin Ryde
2003-09-24 18:06   ` Aaron VanDevender

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030827005621.T1574@netdot.net \
    --to=sig@netdot.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).