develooper Front page | perl.perl6.internals | Postings from December 2001

Another correction to string patch

From:
Peter Gibbs
Date:
December 31, 2001 12:11
Subject:
Another correction to string patch
Message ID:
01e701c19237$61737e20$0b01010a@emkel.co.za
David

You have also forgotten to free the second allocation. I see that you call
free_string(), which is in resources.c, but don't use the matching
new_string_header() function in that file - are these not intended to be a
matched pair for future GC purposes? I am assuming for now that both free()
calls should go in free_string() rather than one in string_destroy() but I
don't know exactly what you and/or Dan intended here.

Peter Gibbs
EmKel Systems


Index: resources.c
===================================================================
RCS file: /home/perlcvs/parrot/resources.c,v
retrieving revision 1.2
diff -c -r1.2 resources.c
*** resources.c 13 Dec 2001 00:51:10 -0000      1.2
--- resources.c 31 Dec 2001 20:03:28 -0000
***************
*** 27,31 ****
--- 27,32 ----
  }

  void free_string(STRING *string) {
+   free(string->bufstart);
    free(string);
  }







nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About