aboutsummaryrefslogtreecommitdiffstats
path: root/perl/Rspamd/Task.xs
diff options
context:
space:
mode:
Diffstat (limited to 'perl/Rspamd/Task.xs')
-rw-r--r--perl/Rspamd/Task.xs21
1 files changed, 21 insertions, 0 deletions
diff --git a/perl/Rspamd/Task.xs b/perl/Rspamd/Task.xs
index 16719ef7b..31928bf7b 100644
--- a/perl/Rspamd/Task.xs
+++ b/perl/Rspamd/Task.xs
@@ -81,3 +81,24 @@ rspamd_task_get_urls (task)
OUTPUT:
RETVAL
+AV*
+rspamd_task_get_text_parts (task)
+ Mail::Rspamd::Task task
+ PREINIT:
+ AV* retav;
+ GList *cur;
+ SV* ps;
+ CODE:
+ retav = newAV ();
+ cur = g_list_first (task->text_parts);
+ while (cur) {
+ ps = newSViv (0);
+ sv_setref_pv (ps, "Mail::Rspamd::TextPart", (Mail__Rspamd__TextPart)(cur->data));
+ av_push(retav, ps);
+ cur = g_list_next (task->text_parts);
+ }
+
+ RETVAL = retav;
+ OUTPUT:
+ RETVAL
+