mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 12:20:20 +02:00
Clean up srcprops implementation
* libguile/deprecated.c (scm_sym_copy, scm_make_srcprops): Deprecate. * libguile/deprecated.h (scm_tc16_srcprops) (SCM_SOURCE_PROPERTY_FLAG_BREAK): Deprecate. * libguile/private-options.h (SCM_COPY_SOURCE_P): Remove. * libguile/read.c (struct t_read_opts, scm_read_options): Remove useless copy read option. (maybe_annotate_source): Change line and column to be tagged, and subtract off lookahead here. Change all callers. (READ_OPTION_COPY_SOURCE_P): Remove, renumbering other options. (init_read_options): Remove copy option. * libguile/srcprop.c: Change to put filename inline in source properties. Update private implementation. * libguile/srcprop.h (SCM_PROCTRACEP): Remove. Unusable given that scm_sym_trace was undefined.
This commit is contained in:
parent
837580587b
commit
6f6abb3bb5
6 changed files with 137 additions and 163 deletions
|
@ -27,13 +27,17 @@
|
|||
|
||||
#define SCM_BUILDING_DEPRECATED_CODE
|
||||
|
||||
#include "alist.h"
|
||||
#include "boolean.h"
|
||||
#include "bitvectors.h"
|
||||
#include "deprecation.h"
|
||||
#include "gc.h"
|
||||
#include "gsubr.h"
|
||||
#include "procprop.h"
|
||||
#include "srcprop.h"
|
||||
#include "srfi-4.h"
|
||||
#include "strings.h"
|
||||
#include "symbols.h"
|
||||
|
||||
#include "deprecated.h"
|
||||
|
||||
|
@ -569,6 +573,19 @@ scm_istr2bve (SCM str)
|
|||
return res;
|
||||
}
|
||||
|
||||
SCM_GLOBAL_SYMBOL (scm_sym_copy, "copy");
|
||||
|
||||
SCM
|
||||
scm_make_srcprops (long line, int col, SCM filename, SCM copy, SCM alist)
|
||||
{
|
||||
scm_c_issue_deprecation_warning
|
||||
("scm_make_srcprops is deprecated; use set-source-properties! instead");
|
||||
|
||||
alist = SCM_UNBNDP (copy) ? alist : scm_acons (scm_sym_copy, copy, alist);
|
||||
return scm_i_make_srcprops (scm_from_long (line), scm_from_int (col),
|
||||
filename, alist);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue