summaryrefslogtreecommitdiff
path: root/libguile/backtrace.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-11-07 18:58:01 +0100
committerAndy Wingo <wingo@pobox.com>2011-11-07 18:58:01 +0100
commit62bd5d66cb66b695452887374c55d025b8b6efea (patch)
tree227dae36a713e1881a6f90a63dba9ec684f88fd0 /libguile/backtrace.c
parenta535e9f54c35bb90bfa272ed040fe71825ce03dd (diff)
downloadguile-62bd5d66cb66b695452887374c55d025b8b6efea.tar.gz
threadsafe access to scm_ptobs
* libguile/ports.h (SCM_PORT_DESCRIPTOR): New macro, to get at a port descriptor in the third word of a port instead of looking it up in a table. (scm_c_port_type_ref, scm_c_port_type_add_x): New API for working with numbered ptob descriptors. (SCM_PTOBNAME): Implement in terms of scm_c_port_type_ref. (scm_get_byte_or_eof, scm_peek_byte_or_eof): Use SCM_PORT_DESCRIPTOR. * libguile/ports.c (scm_c_num_port_types, scm_c_port_type_ref) (scm_c_port_type_add_x, scm_make_port_type): Protect scm_ptobs access with a mutex. Have it be an array of pointers instead of an array of structures. Adapt users to the new APIs. (scm_c_make_port_with_encoding): Allocate ports with three words. The third word is the ptob descriptor. * libguile/backtrace.c: * libguile/goops.c: * libguile/ioext.c: * libguile/print.c: Adapt to use scm_c_port_type_ref and SCM_PORT_DESCRIPTOR.
Diffstat (limited to 'libguile/backtrace.c')
-rw-r--r--libguile/backtrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/backtrace.c b/libguile/backtrace.c
index a9b37fd7c..4dacae2b6 100644
--- a/libguile/backtrace.c
+++ b/libguile/backtrace.c
@@ -214,7 +214,7 @@ static void
display_frame_expr (char *hdr, SCM exp, char *tlr, int indentation, SCM sport, SCM port, scm_print_state *pstate)
{
int i = 0, n;
- scm_t_ptob_descriptor *ptob = scm_ptobs + SCM_PTOBNUM (sport);
+ scm_t_ptob_descriptor *ptob = SCM_PORT_DESCRIPTOR (sport);
do
{
pstate->length = print_params[i].length;