Author: kkaempf Date: Wed Jan 2 14:25:11 2008 New Revision: 8173 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8173&view=rev Log: document origin of file typemap fix id2str, str2id names Modified: trunk/sat-solver/bindings/satsolver.i Modified: trunk/sat-solver/bindings/satsolver.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/satsolver.i?rev=8173&r1=8172&r2=8173&view=diff ============================================================================== --- trunk/sat-solver/bindings/satsolver.i (original) +++ trunk/sat-solver/bindings/satsolver.i Wed Jan 2 14:25:11 2008 @@ -241,15 +241,16 @@ /* types and typemaps */ #if defined(SWIGRUBY) -%typemap(in) FILE* { +/* copied from /usr/share/swig/ruby/file.i */ +%typemap(in) FILE *READ_NOCHECK { OpenFile *fptr; Check_Type($input, T_FILE); GetOpenFile($input, fptr); /*rb_io_check_writable(fptr);*/ $1 = GetReadFile(fptr); + rb_read_check($1) } - #endif typedef int Id; @@ -342,10 +343,12 @@ /* * Name management */ + %rename( "str2id" ) str2id( const char *name ); Id str2id( const char *name ) { return str2id( $self, name, 1 ); } + %rename( "id2str" ) id2str( Id id ); const char *id2str( Id id ) { return my_id2str( $self, id ); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org