Project

General

Profile

Feature #10319

[PATCH] zlib: TypedData conversion

Added by normalperson (Eric Wong) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:65377]

Description

Pretty trivial, this adds internal type-checking and allows us to have a more
accurate view of memory usage. *memsize functions may be more accurate by
making the zstream structure bigger, but memory usage is usually short-lived.

Will commit in a day or two.


Files

#1

Updated by Anonymous over 5 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Applied in changeset r47791.


ext/zlib/zlib.c: TypedData conversion

  • ext/zlib/zlib.c (zstream_mark, zstream_free): update signature (gzfile_mark, gzfile_free): ditto (zstream_memsize): new function for rb_data_type->dsize (gzfile_memsize): ditto (zstream_data_type, gzfile_data_type): new data types (zstream_new): Data_Make_Struct => TypedData_Make_Struct (gzfile_new): ditto (get_zstream, get_gzfile): Data_Get_Struct => TypedData_Get_Struct (rb_zstream_flush_next_in): ditto (rb_zstream_flush_next_out): ditto (rb_zstream_avail_out): ditto (rb_zstream_avail_in): ditto (rb_zstream_closed_p): ditto (rb_deflate_initialize): ditto (rb_deflate_init_copy): ditto (rb_inflate_initialize): ditto (gzfile_ensure_close): ditto (rb_gzfile_closed_p): ditto (rb_gzfile_path): ditto (rb_gzwriter_initialize): ditto (rb_gzreader_initialize): ditto (rb_gzreader_unused): ditto [ruby-core:65377] [Feature #10319]

Also available in: Atom PDF