diff --git a/libguile/ports.c b/libguile/ports.c index a1ebb57d5..0286d90ad 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -1539,7 +1539,7 @@ SCM_DEFINE (scm_port_line, "port-line", 1, 0, 0, { port = SCM_COERCE_OUTPORT (port); SCM_VALIDATE_OPENPORT (1, port); - return scm_from_int (SCM_LINUM (port)); + return scm_from_long (SCM_LINUM (port)); } #undef FUNC_NAME @@ -1551,7 +1551,7 @@ SCM_DEFINE (scm_set_port_line_x, "set-port-line!", 2, 0, 0, { port = SCM_COERCE_OUTPORT (port); SCM_VALIDATE_OPENPORT (1, port); - SCM_PTAB_ENTRY (port)->line_number = scm_to_int (line); + SCM_PTAB_ENTRY (port)->line_number = scm_to_long (line); return SCM_UNSPECIFIED; } #undef FUNC_NAME diff --git a/libguile/read.c b/libguile/read.c index d75839589..73bfdeaa4 100644 --- a/libguile/read.c +++ b/libguile/read.c @@ -89,7 +89,7 @@ scm_i_input_error (char const *function, scm_simple_format (string_port, scm_from_locale_string ("~A:~S:~S: ~A"), scm_list_4 (fn, - scm_from_int (SCM_LINUM (port) + 1), + scm_from_long (SCM_LINUM (port) + 1), scm_from_int (SCM_COL (port) + 1), scm_from_locale_string (message))); @@ -406,7 +406,7 @@ scm_lreadr (SCM *tok_buf, SCM port, SCM *copy) SCM sharp = scm_get_hash_procedure (c); if (scm_is_true (sharp)) { - int line = SCM_LINUM (port); + long line = SCM_LINUM (port); int column = SCM_COL (port) - 2; SCM got; @@ -532,7 +532,7 @@ scm_lreadr (SCM *tok_buf, SCM port, SCM *copy) if (scm_is_true (sharp)) { - int line = SCM_LINUM (port); + long line = SCM_LINUM (port); int column = SCM_COL (port) - 2; SCM got; @@ -822,7 +822,7 @@ scm_lreadrecparen (SCM *tok_buf, SCM port, char *name, SCM *copy) register SCM tl, tl2 = SCM_EOL; SCM ans, ans2 = SCM_EOL; /* Need to capture line and column numbers here. */ - int line = SCM_LINUM (port); + long line = SCM_LINUM (port); int column = SCM_COL (port) - 1; c = scm_flush_ws (port, name);