diff --git a/src/ripple/app/hook/Enum.h b/src/ripple/app/hook/Enum.h index 12dd63379..79d07ce9d 100644 --- a/src/ripple/app/hook/Enum.h +++ b/src/ripple/app/hook/Enum.h @@ -578,10 +578,12 @@ namespace hook_api "hook_skip", "hook_again", "meta_slot", +/* "str_find", "str_replace", "str_concat", "str_compare" +*/ }; }; #endif diff --git a/src/ripple/app/hook/applyHook.h b/src/ripple/app/hook/applyHook.h index 5ae1086c3..e201c60cb 100644 --- a/src/ripple/app/hook/applyHook.h +++ b/src/ripple/app/hook/applyHook.h @@ -202,7 +202,7 @@ namespace hook_api DECLARE_HOOK_FUNCTION(int64_t, meta_slot, uint32_t slot_no ); - +/* DECLARE_HOOK_FUNCTION(int64_t, str_find, uint32_t hread_ptr, uint32_t hread_len, uint32_t nread_ptr, uint32_t nread_len, uint32_t mode, uint32_t n); @@ -217,7 +217,7 @@ namespace hook_api DECLARE_HOOK_FUNCTION(int64_t, str_concat, uint32_t write_ptr, uint32_t write_len, uint32_t read_ptr, uint32_t read_len, uint64_t operand, uint32_t operand_type); - +*/ } /* end namespace hook_api */ namespace hook @@ -619,11 +619,12 @@ namespace hook ADD_HOOK_FUNCTION(meta_slot, ctx); - + /* ADD_HOOK_FUNCTION(str_find, ctx); ADD_HOOK_FUNCTION(str_replace, ctx); ADD_HOOK_FUNCTION(str_compare, ctx); ADD_HOOK_FUNCTION(str_concat, ctx); + */ WasmEdge_TableInstanceContext* hostTable = WasmEdge_TableInstanceCreate(tableType); WasmEdge_ModuleInstanceAddTable(importObj, tableName, hostTable); diff --git a/src/ripple/app/hook/impl/applyHook.cpp b/src/ripple/app/hook/impl/applyHook.cpp index b6a9256cd..31a885bf9 100644 --- a/src/ripple/app/hook/impl/applyHook.cpp +++ b/src/ripple/app/hook/impl/applyHook.cpp @@ -5092,6 +5092,7 @@ DEFINE_HOOK_FUNCTION( return slot_into; } +/* DEFINE_HOOK_FUNCTION( int64_t, @@ -5269,28 +5270,26 @@ findNul(const void* vptr, size_t len) return found; } -/* - Overloaded API: - If operand_type == 0: - Copy read_ptr/len to write_ptr/len, do nothing else. - If operand_type > 0: - Copy read_ptr/len to write_ptr/len up to nul terminator, then - If operand_type == 1: - Concatenate operand as an i32 to the end of the string in write_ptr - If operand_type == 2: - Concatenate operand as an u32 to the end of the string in write_ptr - If operand_type == 3/4: - As above with i/u64 - If operand_type == 5: - As above with operand interpreted as an XFL. Top 4 bits of operand_type are - precision for this type. - If operand_type == 6: - Interpret the four most significant bytes of operand as a ptr, and the - four least significant bytes as a length. - Write the bytes at this location to the end of write_ptr. - Finally: - Add a nul terminator to the end of write_ptr. -*/ +// Overloaded API: +// If operand_type == 0: +// Copy read_ptr/len to write_ptr/len, do nothing else. +// If operand_type > 0: +// Copy read_ptr/len to write_ptr/len up to nul terminator, then +// If operand_type == 1: +// Concatenate operand as an i32 to the end of the string in write_ptr +// If operand_type == 2: +// Concatenate operand as an u32 to the end of the string in write_ptr +// If operand_type == 3/4: +// As above with i/u64 +// If operand_type == 5: +// As above with operand interpreted as an XFL. Top 4 bits of operand_type are +// precision for this type. +// If operand_type == 6: +// Interpret the four most significant bytes of operand as a ptr, and the +// four least significant bytes as a length. +// Write the bytes at this location to the end of write_ptr. +// Finally: +// Add a nul terminator to the end of write_ptr. DEFINE_HOOK_FUNCTION( int64_t, str_concat, @@ -5433,3 +5432,5 @@ DEFINE_HOOK_FUNCTION( return INVALID_ARGUMENT; } } +*/ + diff --git a/src/test/app/SetHook_test.cpp b/src/test/app/SetHook_test.cpp index 2b862bed4..39220e628 100644 --- a/src/test/app/SetHook_test.cpp +++ b/src/test/app/SetHook_test.cpp @@ -7807,6 +7807,7 @@ public: env(pay(bob, alice, XRP(1)), M("test sto_validate"), fee(XRP(1))); } + /* void test_str_compare() { @@ -7826,6 +7827,7 @@ public: test_str_replace() { } + */ void test_trace() @@ -9723,10 +9725,12 @@ public: test_sto_subfield(); // test_sto_validate(); // + /* test_str_compare(); test_str_concat(); test_str_find(); test_str_replace(); + */ test_trace(); test_trace_float();