ext/win32ole/win32ole_method.c in win32ole-1.8.8 vs ext/win32ole/win32ole_method.c in win32ole-1.8.9

- old
+ new

@@ -435,11 +435,11 @@ return type; } /* * call-seq: - * WIN32OLE_MTHOD#invkind + * WIN32OLE_METHOD#invkind * * Returns the method invoke kind. * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks') * method = WIN32OLE_METHOD.new(tobj, 'Add') * puts method.invkind # => 1 @@ -921,12 +921,15 @@ folemethod_inspect(VALUE self) { return default_inspect(self, "WIN32OLE_METHOD"); } +VALUE cWIN32OLE_METHOD; + void Init_win32ole_method(void) { - cWIN32OLE_METHOD = rb_define_class("WIN32OLE_METHOD", rb_cObject); + cWIN32OLE_METHOD = rb_define_class_under(cWIN32OLE, "Method", rb_cObject); + rb_define_const(rb_cObject, "WIN32OLE_METHOD", cWIN32OLE_METHOD); rb_define_alloc_func(cWIN32OLE_METHOD, folemethod_s_allocate); rb_define_method(cWIN32OLE_METHOD, "initialize", folemethod_initialize, 2); rb_define_method(cWIN32OLE_METHOD, "name", folemethod_name, 0); rb_define_method(cWIN32OLE_METHOD, "return_type", folemethod_return_type, 0); rb_define_method(cWIN32OLE_METHOD, "return_vtype", folemethod_return_vtype, 0);