[nasm:master] srcfile: add src_nowhere()

nasm-bot for H. Peter Anvin (Intel) hpa at zytor.com
Tue Aug 25 16:18:06 PDT 2020


Commit-ID:  8c9b8ec2e21e10be73dcbfa8288a124a5f7b133d
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=8c9b8ec2e21e10be73dcbfa8288a124a5f7b133d
Author:     H. Peter Anvin (Intel) <hpa at zytor.com>
AuthorDate: Tue, 25 Aug 2020 15:46:44 -0700
Committer:  H. Peter Anvin (Intel) <hpa at zytor.com>
CommitDate: Tue, 25 Aug 2020 15:46:44 -0700

srcfile: add src_nowhere()

Add src_nowhere() returning (null:0).

Signed-off-by: H. Peter Anvin (Intel) <hpa at zytor.com>


---
 asm/srcfile.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/asm/srcfile.h b/asm/srcfile.h
index ec9965d3..a1853548 100644
--- a/asm/srcfile.h
+++ b/asm/srcfile.h
@@ -44,6 +44,12 @@ struct src_location {
     int32_t lineno;
 };
 
+static inline const_func struct src_location src_nowhere(void)
+{
+    struct src_location no_where = { NULL, 0 };
+    return no_where;
+}
+
 /*
  * Comparing the *pointer value* of filenames is valid, because the
  * filename hash system guarantees that each unique filename string is


More information about the Nasm-commits mailing list