summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2017-07-12 22:47:12 -0400
committerPeter LaFosse <peter@vector35.com>2017-07-12 22:47:12 -0400
commit0e6019edc8c5949de4989ef9577c07913946135b (patch)
treecb3a8dbcbd1f2473f32a6797bced0b4a4b59256f /python/binaryview.py
parentc05fbe9e3cffc727536a6df6893116af1570327c (diff)
Adding remove_metadata API to BinaryView. Add remove APIs to Metadata
Diffstat (limited to 'python/binaryview.py')
-rw-r--r--python/binaryview.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index d04dca86..ee019dcb 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -27,7 +27,7 @@ import threading
# Binary Ninja components
import _binaryninjacore as core
from enums import (AnalysisState, SymbolType, InstructionTextTokenType,
- Endianness, ModificationStatus, StringType, SegmentFlag, MetadataType)
+ Endianness, ModificationStatus, StringType, SegmentFlag)
import function
import startup
import architecture
@@ -3312,6 +3312,19 @@ class BinaryView(object):
raise ValueError("metadata argument must be of type Metadata")
core.BNBinaryViewStoreMetadata(self.handle, key, md.handle)
+ def remove_metadata(self, key):
+ """
+ `remove_metadata` removes the Metadata object associated with key from the current BinaryView
+
+ :param string key: key to remove from the BinaryView
+ :rtype: None
+ :Example:
+
+ >>> bv.store_metadata("integer", Metadata(1337))
+ >>> bv.remove_metadata("integer")
+ """
+ core.BNBinaryViewRemoveMetadata(self.handle, key)
+
def __setattr__(self, name, value):
try:
object.__setattr__(self, name, value)