diff options
author | Andrii Doroshenko (Xrayez) <xrayez@gmail.com> | 2019-10-04 14:35:01 +0300 |
---|---|---|
committer | Andrii Doroshenko (Xrayez) <xrayez@gmail.com> | 2019-10-04 15:51:13 +0300 |
commit | a0d00c0e99aaf7844a330c8e320c0021abb4a3e3 (patch) | |
tree | b894797b9538690ccaaed429665a9cfd163e63e3 /core/variant_call.cpp | |
parent | 3b2033b9419f76ffaff47654372df1559b6c2b95 (diff) | |
download | redot-engine-a0d00c0e99aaf7844a330c8e320c0021abb4a3e3.tar.gz |
Bind the `String::humanize_size` method
The method signature is also changed to use `uint64_t` instead of `size_t`
for it to be Variant-compatible.
Diffstat (limited to 'core/variant_call.cpp')
-rw-r--r-- | core/variant_call.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 53f64fcde6..1b5ca9d3e5 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -284,6 +284,7 @@ struct _VariantCall { VCALL_LOCALMEM0R(String, sha1_buffer); VCALL_LOCALMEM0R(String, sha256_buffer); VCALL_LOCALMEM0R(String, empty); + VCALL_LOCALMEM1R(String, humanize_size); VCALL_LOCALMEM0R(String, is_abs_path); VCALL_LOCALMEM0R(String, is_rel_path); VCALL_LOCALMEM0R(String, get_base_dir); @@ -1561,6 +1562,7 @@ void register_variant_methods() { ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, sha1_buffer, varray()); ADDFUNC0R(STRING, POOL_BYTE_ARRAY, String, sha256_buffer, varray()); ADDFUNC0R(STRING, BOOL, String, empty, varray()); + ADDFUNC1R(STRING, STRING, String, humanize_size, INT, "size", varray()); ADDFUNC0R(STRING, BOOL, String, is_abs_path, varray()); ADDFUNC0R(STRING, BOOL, String, is_rel_path, varray()); ADDFUNC0R(STRING, STRING, String, get_base_dir, varray()); |