From 0caa349f6a66aedb9ced3128860c2643bacc323e Mon Sep 17 00:00:00 2001 From: Arron Vinyard Date: Sat, 7 Nov 2020 16:16:29 -0500 Subject: [PATCH] Update cookie funcs to return newdecl Cookie (#1379) --- plugins/include/clientprefs.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/include/clientprefs.inc b/plugins/include/clientprefs.inc index 43adf459..a3e05060 100644 --- a/plugins/include/clientprefs.inc +++ b/plugins/include/clientprefs.inc @@ -119,7 +119,8 @@ methodmap Cookie < Handle { // no longer needed. // // @param name Name of cookie to find. - // @return A handle to the cookie if it is found. INVALID_HANDLE otherwise. + // @return A handle to the cookie if it is found, null otherwise. + public static native Cookie Find(const char[] name); // Set the value of a Client preference cookie. @@ -183,7 +184,7 @@ methodmap Cookie < Handle { * exists, a handle to it will still be returned. * @error Cookie name is blank. */ -native Handle RegClientCookie(const char[] name, const char[] description, CookieAccess access); +native Cookie RegClientCookie(const char[] name, const char[] description, CookieAccess access); /** * Searches for a Client preference cookie. @@ -192,9 +193,10 @@ native Handle RegClientCookie(const char[] name, const char[] description, Cooki * no longer needed. * * @param name Name of cookie to find. - * @return A handle to the cookie if it is found. INVALID_HANDLE otherwise. + * @return A handle to the cookie if it is found, null otherwise. + */ -native Handle FindClientCookie(const char[] name); +native Cookie FindClientCookie(const char[] name); /** * Set the value of a Client preference cookie.