[Forensics-changes] [yara] 59/135: Add string_array macro to modules.h

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:27:32 UTC 2017


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag v3.1.0
in repository yara.

commit c285e548de2bcc206ba8a053735a52d2dcbd11a4
Author: Victor M. Alvarez <plusvic at gmail.com>
Date:   Tue Jul 15 12:16:17 2014 +0200

    Add string_array macro to modules.h
---
 libyara/include/yara/modules.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/libyara/include/yara/modules.h b/libyara/include/yara/modules.h
index 9ed3a60..25c9494 100644
--- a/libyara/include/yara/modules.h
+++ b/libyara/include/yara/modules.h
@@ -129,6 +129,21 @@ limitations under the License.
   }
 
 
+#define string_array(name) { \
+    YR_OBJECT* array; \
+    FAIL_ON_ERROR(yr_object_create( \
+        OBJECT_TYPE_ARRAY, \
+        name, \
+        stack[stack_top], \
+        &array)); \
+    FAIL_ON_ERROR(yr_object_create( \
+        OBJECT_TYPE_STRING, \
+        name, \
+        array, \
+        NULL)); \
+  }
+
+
 #define function(name, args_fmt, ret_fmt, func) { \
     YR_OBJECT* function; \
     FAIL_ON_ERROR(yr_object_function_create( \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git



More information about the forensics-changes mailing list