summaryrefslogtreecommitdiff
path: root/Lua API.html
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-08-17 14:32:04 +0400
committerAlexander Gavrilov2012-08-17 15:07:48 +0400
commitbcc41c081a43a68042c4757a6569cb690098d9b8 (patch)
tree583f40741778c0e0634fd50610cf6c6f4d979a05 /Lua API.html
parent509d9570908e1befa537d10285942006d148b3a3 (diff)
downloaddfhack-bcc41c081a43a68042c4757a6569cb690098d9b8.tar.gz
dfhack-bcc41c081a43a68042c4757a6569cb690098d9b8.tar.bz2
dfhack-bcc41c081a43a68042c4757a6569cb690098d9b8.tar.xz
Add a utility function for patching read-only memory.
Diffstat (limited to 'Lua API.html')
-rw-r--r--Lua API.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lua API.html b/Lua API.html
index 2c9a6a8d..7dfc7df0 100644
--- a/Lua API.html
+++ b/Lua API.html
@@ -1409,6 +1409,11 @@ global environment, persistent between calls to the script.</p>
<li><p class="first"><tt class="docutils literal">dfhack.internal.getMemRanges()</tt></p>
<p>Returns a sequence of tables describing virtual memory ranges of the process.</p>
</li>
+<li><p class="first"><tt class="docutils literal">dfhack.internal.patchMemory(dest,src,count)</tt></p>
+<p>Like memmove below, but works even if dest is read-only memory, e.g. code.
+If destination overlaps a completely invalid memory region, or another error
+occurs, returns false.</p>
+</li>
<li><p class="first"><tt class="docutils literal">dfhack.internal.memmove(dest,src,count)</tt></p>
<p>Wraps the standard memmove function. Accepts both numbers and refs as pointers.</p>
</li>