[Ruby] Pass Qnil instead of NULL to rb_funcall()

This silences GCC -Wconversion-null warning (on by default with recent
GCC).
This commit is contained in:
Olly Betts 2018-04-03 18:01:58 +12:00
commit 3bea8f6b7e
4 changed files with 17 additions and 13 deletions

View file

@ -3046,7 +3046,7 @@ public:
if (argc > 0) {
Printf(w->code, "%s = rb_funcall(swig_get_self(), rb_intern(\"%s\"), %d%s);\n", Swig_cresult_name(), methodName, argc, args);
} else {
Printf(w->code, "%s = rb_funcall(swig_get_self(), rb_intern(\"%s\"), 0, NULL);\n", Swig_cresult_name(), methodName);
Printf(w->code, "%s = rb_funcall(swig_get_self(), rb_intern(\"%s\"), 0, Qnil);\n", Swig_cresult_name(), methodName);
}
if ( initstack ) Printf(w->code, "SWIG_RELEASE_STACK;\n");
}