Check_Type() added to FILE* typemap

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@1026 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Masaki Fukushima 2001-02-25 11:22:42 +00:00
commit 7353fc53a9

View file

@ -482,6 +482,7 @@ extern "C" {
%}
%typemap(ruby,in) FILE *READ {
OpenFile *of;
Check_Type($source, T_FILE);
GetOpenFile($source, of);
rb_io_check_readable(of);
$target = GetReadFile(of);
@ -489,12 +490,14 @@ extern "C" {
}
%typemap(ruby,in) FILE *READ_NOCHECK {
OpenFile *of;
Check_Type($source, T_FILE);
GetOpenFile($source, of);
rb_io_check_readable(of);
$target = GetReadFile(of);
}
%typemap(ruby,in) FILE *WRITE {
OpenFile *of;
Check_Type($source, T_FILE);
GetOpenFile($source, of);
rb_io_check_writable(of);
$target = GetWriteFile(of);