/[guile]/guile/guile-core/libguile/strports.c
ViewVC logotype

Diff of /guile/guile-core/libguile/strports.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.97 by mvo, Sat Apr 5 19:10:22 2003 UTC revision 1.98 by mdj, Thu Apr 24 16:02:04 2003 UTC
# Line 1  Line 1 
1  /* Copyright (C) 1995,1996,1998,1999,2000,2001,2002 Free Software Foundation, Inc.  /* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003 Free Software Foundation, Inc.
2   *   *
3   * This library is free software; you can redistribute it and/or   * This library is free software; you can redistribute it and/or
4   * modify it under the terms of the GNU Lesser General Public   * modify it under the terms of the GNU Lesser General Public
# Line 260  scm_mkstrport (SCM pos, SCM str, long mo Line 260  scm_mkstrport (SCM pos, SCM str, long mo
260    if (!((modes & SCM_WRTNG) || (modes & SCM_RDNG)))    if (!((modes & SCM_WRTNG) || (modes & SCM_RDNG)))
261      scm_misc_error ("scm_mkstrport", "port must read or write", SCM_EOL);      scm_misc_error ("scm_mkstrport", "port must read or write", SCM_EOL);
262    
263    SCM_DEFER_INTS;    scm_mutex_lock (&scm_i_port_table_mutex);
264    z = scm_new_port_table_entry (scm_tc16_strport);    z = scm_new_port_table_entry (scm_tc16_strport);
265    pt = SCM_PTAB_ENTRY(z);    pt = SCM_PTAB_ENTRY(z);
266    SCM_SETSTREAM (z, SCM_UNPACK (str));    SCM_SETSTREAM (z, SCM_UNPACK (str));
# Line 272  scm_mkstrport (SCM pos, SCM str, long mo Line 272  scm_mkstrport (SCM pos, SCM str, long mo
272    
273    pt->rw_random = 1;    pt->rw_random = 1;
274    
275    SCM_ALLOW_INTS;    scm_mutex_unlock (&scm_i_port_table_mutex);
276    
277    /* ensure write_pos is writable. */    /* ensure write_pos is writable. */
278    if ((modes & SCM_WRTNG) && pt->write_pos == pt->write_end)    if ((modes & SCM_WRTNG) && pt->write_pos == pt->write_end)

Legend:
Removed from v.1.97  
changed lines
  Added in v.1.98

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26