Skip to content

Commit 80ec49b

Browse files
authored
adjust comments (#411)
1 parent 7a14804 commit 80ec49b

File tree

7 files changed

+49
-49
lines changed

7 files changed

+49
-49
lines changed

comtypes/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ class ReturnHRESULT(Exception):
150150
without logging an error.
151151
"""
152152

153-
##class IDLWarning(UserWarning):
154-
## "Warn about questionable type information"
153+
# class IDLWarning(UserWarning):
154+
# "Warn about questionable type information"
155155

156156
_GUID = GUID
157157
IID = GUID
@@ -395,7 +395,7 @@ def __setattr__(self, name, value):
395395
# XXX I'm no longer sure why the code generator generates
396396
# "_methods_ = []" in the interface definition, and later
397397
# overrides this by "Interface._methods_ = [...]
398-
## assert self.__dict__.get("_methods_", None) is None
398+
# assert self.__dict__.get("_methods_", None) is None
399399
self._make_methods(value)
400400
self._make_specials()
401401
elif name == "_disp_methods_":

comtypes/_comobject.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,18 @@ def hack(inst, mth, paramflags, interface, mthname):
133133
args_out = len(args_out_idx)
134134

135135
## XXX Remove this:
136-
## if args_in != code.co_argcount - 1:
137-
## return catch_errors(inst, mth, interface, mthname)
136+
# if args_in != code.co_argcount - 1:
137+
# return catch_errors(inst, mth, interface, mthname)
138138

139139
clsid = getattr(inst, "_reg_clsid_", None)
140140

141141
def call_without_this(this, *args):
142142
# Method implementations could check for and return E_POINTER
143143
# themselves. Or an error will be raised when
144144
# 'outargs[i][0] = value' is executed.
145-
## for a in outargs:
146-
## if not a:
147-
## return E_POINTER
145+
# for a in outargs:
146+
# if not a:
147+
# return E_POINTER
148148

149149
#make argument list for handler by index array built above
150150
inargs = []

comtypes/_safearray.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
from comtypes import HRESULT, GUID
66

77
################################################################
8-
##if __debug__:
9-
## from ctypeslib.dynamic_module import include
10-
## include("""\
11-
## #define UNICODE
12-
## #define NO_STRICT
13-
## #include <windows.h>
14-
## """,
15-
## persist=True)
8+
# if __debug__:
9+
# from ctypeslib.dynamic_module import include
10+
# include("""\
11+
# #define UNICODE
12+
# #define NO_STRICT
13+
# #include <windows.h>
14+
# """,
15+
# persist=True)
1616

1717
################################################################
1818

comtypes/automation.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -505,30 +505,30 @@ def __getitem__(self, index):
505505
return v.value
506506

507507

508-
# these are missing:
509-
## getter[VT_ERROR]
510-
## getter[VT_ARRAY]
511-
## getter[VT_BYREF|VT_UI1]
512-
## getter[VT_BYREF|VT_I2]
513-
## getter[VT_BYREF|VT_I4]
514-
## getter[VT_BYREF|VT_R4]
515-
## getter[VT_BYREF|VT_R8]
516-
## getter[VT_BYREF|VT_BOOL]
517-
## getter[VT_BYREF|VT_ERROR]
518-
## getter[VT_BYREF|VT_CY]
519-
## getter[VT_BYREF|VT_DATE]
520-
## getter[VT_BYREF|VT_BSTR]
521-
## getter[VT_BYREF|VT_UNKNOWN]
522-
## getter[VT_BYREF|VT_DISPATCH]
523-
## getter[VT_BYREF|VT_ARRAY]
524-
## getter[VT_BYREF|VT_VARIANT]
525-
## getter[VT_BYREF]
526-
## getter[VT_BYREF|VT_DECIMAL]
527-
## getter[VT_BYREF|VT_I1]
528-
## getter[VT_BYREF|VT_UI2]
529-
## getter[VT_BYREF|VT_UI4]
530-
## getter[VT_BYREF|VT_INT]
531-
## getter[VT_BYREF|VT_UINT]
508+
# these are missing:
509+
# getter[VT_ERROR]
510+
# getter[VT_ARRAY]
511+
# getter[VT_BYREF|VT_UI1]
512+
# getter[VT_BYREF|VT_I2]
513+
# getter[VT_BYREF|VT_I4]
514+
# getter[VT_BYREF|VT_R4]
515+
# getter[VT_BYREF|VT_R8]
516+
# getter[VT_BYREF|VT_BOOL]
517+
# getter[VT_BYREF|VT_ERROR]
518+
# getter[VT_BYREF|VT_CY]
519+
# getter[VT_BYREF|VT_DATE]
520+
# getter[VT_BYREF|VT_BSTR]
521+
# getter[VT_BYREF|VT_UNKNOWN]
522+
# getter[VT_BYREF|VT_DISPATCH]
523+
# getter[VT_BYREF|VT_ARRAY]
524+
# getter[VT_BYREF|VT_VARIANT]
525+
# getter[VT_BYREF]
526+
# getter[VT_BYREF|VT_DECIMAL]
527+
# getter[VT_BYREF|VT_I1]
528+
# getter[VT_BYREF|VT_UI2]
529+
# getter[VT_BYREF|VT_UI4]
530+
# getter[VT_BYREF|VT_INT]
531+
# getter[VT_BYREF|VT_UINT]
532532

533533
value = property(_get_value, _set_value)
534534

@@ -630,9 +630,9 @@ def next(self):
630630
def __getitem__(self, index):
631631
self.Reset()
632632
# Does not yet work.
633-
## if isinstance(index, slice):
634-
## self.Skip(index.start or 0)
635-
## return self.Next(index.stop or sys.maxint)
633+
# if isinstance(index, slice):
634+
# self.Skip(index.start or 0)
635+
# return self.Next(index.stop or sys.maxint)
636636
self.Skip(index)
637637
item, fetched = self.Next(1)
638638
if fetched:
@@ -694,7 +694,7 @@ def __repr__(self):
694694
('bstrHelpFile', BSTR),
695695
('dwHelpContext', DWORD),
696696
('pvReserved', c_void_p),
697-
## ('pfnDeferredFillIn', WINFUNCTYPE(HRESULT, POINTER(tagEXCEPINFO))),
697+
# ('pfnDeferredFillIn', WINFUNCTYPE(HRESULT, POINTER(tagEXCEPINFO))),
698698
('pfnDeferredFillIn', c_void_p),
699699
('scode', SCODE),
700700
]
@@ -942,8 +942,8 @@ def Invoke(self, dispid, *args, **kw):
942942
POINTER(BSTR): VT_BYREF|VT_BSTR,
943943

944944
# These are not yet implemented:
945-
## POINTER(IUnknown): VT_UNKNOWN,
946-
## POINTER(IDispatch): VT_DISPATCH,
945+
# POINTER(IUnknown): VT_UNKNOWN,
946+
# POINTER(IDispatch): VT_DISPATCH,
947947
}
948948

949949
_vartype_to_ctype = {}

comtypes/persist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class IPropertyBag(IUnknown):
3939
( ['in'], WSTRING, 'pszPropName' ),
4040
( ['in', 'out'], POINTER(VARIANT), 'pVar' ),
4141
( ['in'], POINTER(IErrorLog), 'pErrorLog' )),
42-
## ( ['in', 'out'], POINTER(IErrorLog), 'pErrorLog' )),
42+
# ( ['in', 'out'], POINTER(IErrorLog), 'pErrorLog' )),
4343
COMMETHOD([], HRESULT, 'Write',
4444
( ['in'], WSTRING, 'pszPropName' ),
4545
( ['in'], POINTER(VARIANT), 'pVar' )),

comtypes/safearray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def __getitem__(self, index):
218218

219219
def __setitem__(self, index, value):
220220
# XXX Need this to implement [in, out] safearrays in COM servers!
221-
## print "__setitem__", index, value
221+
# print "__setitem__", index, value
222222
raise TypeError("Setting items not allowed")
223223

224224
def __ctypes_from_outparam__(self):

comtypes/typeinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ class tagARRAYDESC(Structure):
750750
COMMETHOD([], HRESULT, 'GetImplTypeFlags',
751751
(['in'], UINT, 'index'),
752752
(['out'], POINTER(INT))),
753-
## STDMETHOD(HRESULT, 'GetIDsOfNames', [POINTER(LPOLESTR), UINT, POINTER(MEMBERID)]),
753+
# STDMETHOD(HRESULT, 'GetIDsOfNames', [POINTER(LPOLESTR), UINT, POINTER(MEMBERID)]),
754754
# this one changed, to accept c_wchar_p array
755755
STDMETHOD(HRESULT, 'GetIDsOfNames', [POINTER(c_wchar_p), UINT, POINTER(MEMBERID)]),
756756
STDMETHOD(HRESULT, 'Invoke', [PVOID, MEMBERID, WORD, POINTER(DISPPARAMS), POINTER(VARIANT), POINTER(EXCEPINFO), POINTER(UINT)]),

0 commit comments

Comments
 (0)