Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust comment indentations in files under the .../comtypes/ #411

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions comtypes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ class ReturnHRESULT(Exception):
without logging an error.
"""

##class IDLWarning(UserWarning):
## "Warn about questionable type information"
# class IDLWarning(UserWarning):
# "Warn about questionable type information"

_GUID = GUID
IID = GUID
Expand Down Expand Up @@ -395,7 +395,7 @@ def __setattr__(self, name, value):
# XXX I'm no longer sure why the code generator generates
# "_methods_ = []" in the interface definition, and later
# overrides this by "Interface._methods_ = [...]
## assert self.__dict__.get("_methods_", None) is None
# assert self.__dict__.get("_methods_", None) is None
self._make_methods(value)
self._make_specials()
elif name == "_disp_methods_":
Expand Down
10 changes: 5 additions & 5 deletions comtypes/_comobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,18 @@ def hack(inst, mth, paramflags, interface, mthname):
args_out = len(args_out_idx)

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

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

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

#make argument list for handler by index array built above
inargs = []
Expand Down
16 changes: 8 additions & 8 deletions comtypes/_safearray.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
from comtypes import HRESULT, GUID

################################################################
##if __debug__:
## from ctypeslib.dynamic_module import include
## include("""\
## #define UNICODE
## #define NO_STRICT
## #include <windows.h>
## """,
## persist=True)
# if __debug__:
# from ctypeslib.dynamic_module import include
# include("""\
# #define UNICODE
# #define NO_STRICT
# #include <windows.h>
# """,
# persist=True)

################################################################

Expand Down
60 changes: 30 additions & 30 deletions comtypes/automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,30 +505,30 @@ def __getitem__(self, index):
return v.value


# these are missing:
## getter[VT_ERROR]
## getter[VT_ARRAY]
## getter[VT_BYREF|VT_UI1]
## getter[VT_BYREF|VT_I2]
## getter[VT_BYREF|VT_I4]
## getter[VT_BYREF|VT_R4]
## getter[VT_BYREF|VT_R8]
## getter[VT_BYREF|VT_BOOL]
## getter[VT_BYREF|VT_ERROR]
## getter[VT_BYREF|VT_CY]
## getter[VT_BYREF|VT_DATE]
## getter[VT_BYREF|VT_BSTR]
## getter[VT_BYREF|VT_UNKNOWN]
## getter[VT_BYREF|VT_DISPATCH]
## getter[VT_BYREF|VT_ARRAY]
## getter[VT_BYREF|VT_VARIANT]
## getter[VT_BYREF]
## getter[VT_BYREF|VT_DECIMAL]
## getter[VT_BYREF|VT_I1]
## getter[VT_BYREF|VT_UI2]
## getter[VT_BYREF|VT_UI4]
## getter[VT_BYREF|VT_INT]
## getter[VT_BYREF|VT_UINT]
# these are missing:
# getter[VT_ERROR]
# getter[VT_ARRAY]
# getter[VT_BYREF|VT_UI1]
# getter[VT_BYREF|VT_I2]
# getter[VT_BYREF|VT_I4]
# getter[VT_BYREF|VT_R4]
# getter[VT_BYREF|VT_R8]
# getter[VT_BYREF|VT_BOOL]
# getter[VT_BYREF|VT_ERROR]
# getter[VT_BYREF|VT_CY]
# getter[VT_BYREF|VT_DATE]
# getter[VT_BYREF|VT_BSTR]
# getter[VT_BYREF|VT_UNKNOWN]
# getter[VT_BYREF|VT_DISPATCH]
# getter[VT_BYREF|VT_ARRAY]
# getter[VT_BYREF|VT_VARIANT]
# getter[VT_BYREF]
# getter[VT_BYREF|VT_DECIMAL]
# getter[VT_BYREF|VT_I1]
# getter[VT_BYREF|VT_UI2]
# getter[VT_BYREF|VT_UI4]
# getter[VT_BYREF|VT_INT]
# getter[VT_BYREF|VT_UINT]

value = property(_get_value, _set_value)

Expand Down Expand Up @@ -630,9 +630,9 @@ def next(self):
def __getitem__(self, index):
self.Reset()
# Does not yet work.
## if isinstance(index, slice):
## self.Skip(index.start or 0)
## return self.Next(index.stop or sys.maxint)
# if isinstance(index, slice):
# self.Skip(index.start or 0)
# return self.Next(index.stop or sys.maxint)
self.Skip(index)
item, fetched = self.Next(1)
if fetched:
Expand Down Expand Up @@ -694,7 +694,7 @@ def __repr__(self):
('bstrHelpFile', BSTR),
('dwHelpContext', DWORD),
('pvReserved', c_void_p),
## ('pfnDeferredFillIn', WINFUNCTYPE(HRESULT, POINTER(tagEXCEPINFO))),
# ('pfnDeferredFillIn', WINFUNCTYPE(HRESULT, POINTER(tagEXCEPINFO))),
('pfnDeferredFillIn', c_void_p),
('scode', SCODE),
]
Expand Down Expand Up @@ -942,8 +942,8 @@ def Invoke(self, dispid, *args, **kw):
POINTER(BSTR): VT_BYREF|VT_BSTR,

# These are not yet implemented:
## POINTER(IUnknown): VT_UNKNOWN,
## POINTER(IDispatch): VT_DISPATCH,
# POINTER(IUnknown): VT_UNKNOWN,
# POINTER(IDispatch): VT_DISPATCH,
}

_vartype_to_ctype = {}
Expand Down
2 changes: 1 addition & 1 deletion comtypes/persist.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class IPropertyBag(IUnknown):
( ['in'], WSTRING, 'pszPropName' ),
( ['in', 'out'], POINTER(VARIANT), 'pVar' ),
( ['in'], POINTER(IErrorLog), 'pErrorLog' )),
## ( ['in', 'out'], POINTER(IErrorLog), 'pErrorLog' )),
# ( ['in', 'out'], POINTER(IErrorLog), 'pErrorLog' )),
COMMETHOD([], HRESULT, 'Write',
( ['in'], WSTRING, 'pszPropName' ),
( ['in'], POINTER(VARIANT), 'pVar' )),
Expand Down
2 changes: 1 addition & 1 deletion comtypes/safearray.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def __getitem__(self, index):

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

def __ctypes_from_outparam__(self):
Expand Down
2 changes: 1 addition & 1 deletion comtypes/typeinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ class tagARRAYDESC(Structure):
COMMETHOD([], HRESULT, 'GetImplTypeFlags',
(['in'], UINT, 'index'),
(['out'], POINTER(INT))),
## STDMETHOD(HRESULT, 'GetIDsOfNames', [POINTER(LPOLESTR), UINT, POINTER(MEMBERID)]),
# STDMETHOD(HRESULT, 'GetIDsOfNames', [POINTER(LPOLESTR), UINT, POINTER(MEMBERID)]),
# this one changed, to accept c_wchar_p array
STDMETHOD(HRESULT, 'GetIDsOfNames', [POINTER(c_wchar_p), UINT, POINTER(MEMBERID)]),
STDMETHOD(HRESULT, 'Invoke', [PVOID, MEMBERID, WORD, POINTER(DISPPARAMS), POINTER(VARIANT), POINTER(EXCEPINFO), POINTER(UINT)]),
Expand Down