summaryrefslogtreecommitdiff
path: root/ext/win32ole/win32ole_method.c
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-07 12:44:53 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-07 12:44:53 +0000
commitabd783434a6148937c6cc64dc8435c43b120db52 (patch)
tree7f707e43a7e9ed527c4b725d6d2f39cbafdbbbfd /ext/win32ole/win32ole_method.c
parentaabdfeaca31f8acdeb75f42b60b8cbc5b5e84e13 (diff)
ext/win32ole/win32ole_method.c: refactoring. add
olemethod_data_get_struct to wrap Data_Get_Struct. ext/win32ole/win32ole_method.h: ditto. ext/win32ole/win32ole_param.c (oleparam_ole_param): call olemethod_data_get_struct instead of Data_Get_Struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole/win32ole_method.c')
-rw-r--r--ext/win32ole/win32ole_method.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/win32ole/win32ole_method.c b/ext/win32ole/win32ole_method.c
index 4d3a398..1c06850 100644
--- a/ext/win32ole/win32ole_method.c
+++ b/ext/win32ole/win32ole_method.c
@@ -48,6 +48,14 @@ olemethod_free(struct olemethoddata *polemethod)
OLE_FREE(polemethod->pOwnerTypeInfo);
free(polemethod);
}
+
+struct olemethoddata *
+olemethod_data_get_struct(VALUE obj)
+{
+ struct olemethoddata *pmethod;
+ Data_Get_Struct(obj, struct olemethoddata, pmethod);
+ return pmethod;
+}
static VALUE
ole_method_sub(VALUE self, ITypeInfo *pOwnerTypeInfo, ITypeInfo *pTypeInfo, VALUE name)