Add internal-only port structure and move iconv descriptors there.
[bpt/guile.git] / libguile / ports-internal.h
1 /*
2 * ports-internal.h - internal-only declarations for ports.
3 *
4 * Copyright (C) 2013 Free Software Foundation, Inc.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License
8 * as published by the Free Software Foundation; either version 3 of
9 * the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 * 02110-1301 USA
20 */
21
22 #ifndef SCM_PORTS_INTERNAL
23 #define SCM_PORTS_INTERNAL
24
25 #include "libguile/_scm.h"
26 #include "libguile/ports.h"
27
28 struct scm_port_internal
29 {
30 /* input/output iconv conversion descriptors */
31 void *input_cd;
32 void *output_cd;
33 };
34
35 typedef struct scm_port_internal scm_t_port_internal;
36
37 #define SCM_PORT_GET_INTERNAL(x) \
38 ((scm_t_port_internal *) (SCM_PTAB_ENTRY(x)->input_cd))
39
40 #endif