[ruby] must not do a null check for VALUE.
This commit is contained in:
parent
806f49bf58
commit
cb1f89cb68
1 changed files with 3 additions and 3 deletions
|
|
@ -67,7 +67,7 @@ namespace swig {
|
||||||
static std::shared_ptr<Type> as(VALUE obj, bool throw_error) {
|
static std::shared_ptr<Type> as(VALUE obj, bool throw_error) {
|
||||||
std::shared_ptr<Type> ret;
|
std::shared_ptr<Type> ret;
|
||||||
std::shared_ptr<Type> *v = &ret;
|
std::shared_ptr<Type> *v = &ret;
|
||||||
int res = (obj ? traits_asptr<std::shared_ptr<Type> >::asptr(obj, &v) : SWIG_ERROR);
|
int res = traits_asptr<std::shared_ptr<Type> >::asptr(obj, &v);
|
||||||
if (SWIG_IsOK(res)) {
|
if (SWIG_IsOK(res)) {
|
||||||
return ret;
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue