Add internal-only port structure and move iconv descriptors there.
authorMark H Weaver <mhw@netris.org>
Sun, 31 Mar 2013 02:34:56 +0000 (22:34 -0400)
committerMark H Weaver <mhw@netris.org>
Mon, 1 Apr 2013 20:13:47 +0000 (16:13 -0400)
commite459855936262b4bddaebd87a75abdc065799be2
tree9da39bc6d82491caadaa13b37af767ba7e69cd07
parent663780bb1c881947b6e4f00c456b2b367701982d
Add internal-only port structure and move iconv descriptors there.

* libguile/ports-internal.h: New file.

* libguile/Makefile.am (noinst_HEADERS): Add ports-internal.h.

* libguile/ports.h (scm_t_port): Add a comment mentioning that the
  'input_cd' and 'output_cd' fields of the public structure are no
  longer what they seem to be.

* libguile/ports.c: Include ports-internal.h.

  (finalize_port, scm_i_remove_port, get_iconv_codepoint, get_codepoint,
  scm_i_set_port_encoding_x): Access 'input_cd' and 'output_cd' via the
  new internal port structure.

  (scm_new_port_table_entry): Allocate and initialize the internal port
  structure.

* libguile/print.c: Include ports-internal.h.

  (display_string_using_iconv, display_string): Access 'input_cd' and
  'output_cd' via 'internal' pointer.
libguile/Makefile.am
libguile/ports-internal.h [new file with mode: 0644]
libguile/ports.c
libguile/ports.h
libguile/print.c