fix for ruby -w
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7948 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
563a0d6388
commit
f222064ffd
1 changed files with 7 additions and 0 deletions
|
|
@ -289,12 +289,19 @@ SWIG_Ruby_GetModule()
|
||||||
{
|
{
|
||||||
VALUE pointer;
|
VALUE pointer;
|
||||||
swig_module_info *ret = 0;
|
swig_module_info *ret = 0;
|
||||||
|
VALUE verbose = rb_gv_get("VERBOSE");
|
||||||
|
|
||||||
|
/* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
|
||||||
|
rb_gv_set("VERBOSE", Qfalse);
|
||||||
|
|
||||||
/* first check if pointer already created */
|
/* first check if pointer already created */
|
||||||
pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
|
pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
|
||||||
if (pointer != Qnil) {
|
if (pointer != Qnil) {
|
||||||
Data_Get_Struct(pointer, swig_module_info, ret);
|
Data_Get_Struct(pointer, swig_module_info, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* reinstate warnings */
|
||||||
|
rb_gv_set("VERBOSE", verbose);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue