Guest User

Untitled

a guest
Feb 16th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. From 8cd5b375dbf1d53eb65bf8243da31f1666a13c11 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Le Fessant <fabrice@ocamlpro.com>
  3. Date: Mon, 23 May 2011 16:22:24 +0200
  4. Subject: [PATCH] * Fix the case where !input_name is not initialized (i.e. "_none_", while
  5. it is assumed to be "")
  6.  
  7. ---
  8. inline-more/parsing/location.ml | 2 +-
  9. 1 files changed, 1 insertions(+), 1 deletions(-)
  10.  
  11. diff --git a/inline-more/parsing/location.ml b/inline-more/parsing/location.ml
  12. index 15b074a..f448ef1 100644
  13. --- a/inline-more/parsing/location.ml
  14. +++ b/inline-more/parsing/location.ml
  15. @@ -205,7 +205,7 @@ let (msg_file, msg_line, msg_chars, msg_to, msg_colon, msg_head) =
  16. (* return file, line, char from the given position *)
  17. let get_pos_info pos =
  18. let (filename, linenum, linebeg) =
  19. - if pos.pos_fname = "" && !input_name = "" then
  20. + if pos.pos_fname = "" && (!input_name = "" || !input_name = "_none_") then
  21. ("", -1, 0)
  22. else if pos.pos_fname = "" then
  23. Linenum.for_position !input_name pos.pos_cnum
  24. --
  25. 1.7.1
Add Comment
Please, Sign In to add comment