mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 10:28:09 +01:00
ruby: add filenames helper
Right now it doesn't do much, but it will help for further reorganization. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
parent
a554690d6a
commit
777b02a7d7
4 changed files with 12 additions and 3 deletions
|
@ -224,6 +224,9 @@ VALUE
|
|||
notmuch_rb_directory_get_child_directories (VALUE self);
|
||||
|
||||
/* filenames.c */
|
||||
VALUE
|
||||
notmuch_rb_filenames_get (notmuch_filenames_t *fnames);
|
||||
|
||||
VALUE
|
||||
notmuch_rb_filenames_destroy (VALUE self);
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ notmuch_rb_directory_get_child_files (VALUE self)
|
|||
|
||||
fnames = notmuch_directory_get_child_files (dir);
|
||||
|
||||
return Data_Wrap_Notmuch_Object (notmuch_rb_cFileNames, ¬much_rb_filenames_type, fnames);
|
||||
return notmuch_rb_filenames_get (fnames);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -106,5 +106,5 @@ notmuch_rb_directory_get_child_directories (VALUE self)
|
|||
|
||||
fnames = notmuch_directory_get_child_directories (dir);
|
||||
|
||||
return Data_Wrap_Notmuch_Object (notmuch_rb_cFileNames, ¬much_rb_filenames_type, fnames);
|
||||
return notmuch_rb_filenames_get (fnames);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,12 @@
|
|||
|
||||
#include "defs.h"
|
||||
|
||||
VALUE
|
||||
notmuch_rb_filenames_get (notmuch_filenames_t *fnames)
|
||||
{
|
||||
return Data_Wrap_Notmuch_Object (notmuch_rb_cFileNames, ¬much_rb_filenames_type, fnames);
|
||||
}
|
||||
|
||||
/*
|
||||
* call-seq: FILENAMES.destroy! => nil
|
||||
*
|
||||
|
|
|
@ -120,7 +120,7 @@ notmuch_rb_message_get_filenames (VALUE self)
|
|||
|
||||
fnames = notmuch_message_get_filenames (message);
|
||||
|
||||
return Data_Wrap_Notmuch_Object (notmuch_rb_cFileNames, ¬much_rb_filenames_type, fnames);
|
||||
return notmuch_rb_filenames_get (fnames);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue