commit bd58d2b: [Minor] Distinguish nil from none

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Apr 13 15:49:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-04-13 16:14:06 +0100
URL: https://github.com/rspamd/rspamd/commit/bd58d2b9315655e1d0d02a47f667937ae0851c82

[Minor] Distinguish nil from none

---
 src/lua/lua_url.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lua/lua_url.c b/src/lua/lua_url.c
index ad938c052..f18792c6c 100644
--- a/src/lua/lua_url.c
+++ b/src/lua/lua_url.c
@@ -1252,7 +1252,7 @@ lua_url_cbdata_fill_exclude_include (lua_State *L,
 			}
 		}
 	}
-	else if (pos_arg_type == LUA_TNIL) {
+	else if (pos_arg_type == LUA_TNIL || pos_arg_type == LUA_TNONE) {
 		/* Include all flags */
 		include_flags_mask = ~0U;
 	}
@@ -1280,7 +1280,7 @@ lua_url_cbdata_fill_exclude_include (lua_State *L,
 			}
 		}
 	}
-	else if (pos_arg_type == LUA_TNIL) {
+	else if (pos_arg_type == LUA_TNIL || pos_arg_type == LUA_TNONE) {
 		/* Empty all exclude flags */
 		exclude_flags_mask = 0U;
 	}


More information about the Commits mailing list