Commit Graph

23 Commits

Author SHA1 Message Date
Kristján Valur Jónsson 5e4e31f76a Fix various minor issues discovered with static analysis using Visual Studio 2005 Team System.
Removed obsolete comment, since .dll modules are no longer supported on windows, only .pyd.
2007-04-21 12:46:49 +00:00
Martin v. Löwis bda0dde1c4 Patch #1448199: Release GIL around ConnectRegistry. 2006-07-24 10:26:33 +00:00
Tim Peters 313fcd41ab PyEnumKey(): Stop including the trailing NUL byte
in the returned string (logic error introduced by
recent patch).
2006-02-19 04:05:39 +00:00
Tim Peters d9ab979f36 PyEnumKey(): Remove unused local. 2006-02-19 03:34:15 +00:00
Georg Brandl b2699b242d Add sizeof() instead of hardcoding variable length 2006-02-18 23:44:24 +00:00
Georg Brandl 9a928e787c Patch #977553: speed up RegEnumKey call 2006-02-18 23:35:11 +00:00
Neal Norwitz 1ac754fa10 Check return result from Py_InitModule*(). This API can fail.
Probably should be backported.
2006-01-19 06:09:39 +00:00
Tim Peters c3d12ac88c const poisoning, spreading to fix new const warnings
in _winreg.c.
2005-12-24 06:03:06 +00:00
Guido van Rossum a6a38ad55c Remove all uses of alloca() from this module. The alloca() return value
isn't checked, and it *is* possible that a very large alloca() call is
made, e.g. when a large registry value is being read.  I don't know if
alloca() in that case returns NULL or returns a pointer pointing outside
the stack, and I don't want to know -- I've simply replaced all calls to
alloca() with either PyMem_Malloc() or PyString_FromStringAndSize(NULL,)
as appropriate, followed by a size check.  This addresses SF buf 851056.
Will backport to 2.3 next.
2003-11-30 22:01:43 +00:00
Mark Hammond c9083b66bd Correct docstring for SetValueEx() 2003-01-15 23:38:15 +00:00
Thomas Heller e1d18f52c3 Fix an error message in the _winreg module. The error message referred
to a constant in the 'win32con' module, but this constant is also
defined in the _winreg module itself.

Bugfix candidate.
2002-12-20 20:13:35 +00:00
Guido van Rossum e3a8e7ed1d Call me anal, but there was a particular phrase that was speading to
comments everywhere that bugged me: /* Foo is inlined */ instead of
/* Inline Foo */.  Somehow the "is inlined" phrase always confused me
for half a second (thinking, "No it isn't" until I added the missing
"here").  The new phrase is hopefully unambiguous.
2002-08-19 19:26:42 +00:00
Mark Hammond 8235ea1c3a Land Patch [ 566100 ] Rationalize DL_IMPORT and DL_EXPORT. 2002-07-19 06:55:41 +00:00
Martin v. Löwis 14f8b4cfcb Patch #568124: Add doc string macros. 2002-06-13 20:33:02 +00:00
Neal Norwitz 031829d3ef Use symbolic METH_VARARGS instead of 1 for ml_flags 2002-03-31 14:37:44 +00:00
Mark Hammond 4e80bb551e Allow any object supporting the buffer protocol to be written as a binary object. 2000-07-28 03:44:41 +00:00
Thomas Wouters 7e47402264 Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either
comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").

There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
2000-07-16 12:04:32 +00:00
Fred Drake 25e1726d31 [*** Not tested as I don't have Windows running right now! ***]
Trent Mick <trentm@activestate.com>:

Fix PC/msvcrtmodule.c and PC/winreg.c for Win64. Basically:

- sizeof(HKEY) > sizeof(long) on Win64, so use PyLong_FromVoidPtr()
instead of PyInt_FromLong() to return HKEY values on Win64

- Check for string overflow of an arbitrary registry value (I know
that ensuring that a registry value does not overflow 2**31 characters
seems ridiculous but it is *possible*).

Closes SourceForge patch #100517.
2000-06-30 17:48:51 +00:00
Fred Drake 13634cf7a4 This patch addresses two main issues: (1) There exist some non-fatal
errors in some of the hash algorithms. For exmaple, in float_hash and
complex_hash a certain part of the value is not included in the hash
calculation. See Tim's, Guido's, and my discussion of this on
python-dev in May under the title "fix float_hash and complex_hash for
64-bit *nix"

(2) The hash algorithms that use pointers (e.g. func_hash, code_hash)
are universally not correct on Win64 (they assume that sizeof(long) ==
sizeof(void*))

As well, this patch significantly cleans up the hash code. It adds the
two function _Py_HashDouble and _PyHash_VoidPtr that the various
hashing routine are changed to use.

These help maintain the hash function invariant: (a==b) =>
(hash(a)==hash(b))) I have added Lib/test/test_hash.py and
Lib/test/output/test_hash to test this for some cases.
2000-06-29 19:17:04 +00:00
Fred Drake 270e19b060 Update the module name to _winreg, pending checkin of Paul Prescod's
OO wrapper for this module.
2000-06-29 16:14:14 +00:00
Mark Hammond b422f95db0 Cleanup a few docstrings. 2000-06-09 06:01:47 +00:00
Guido van Rossum b18618dab7 Vladimir Marangozov's long-awaited malloc restructuring.
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.

(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode.  I'm also holding back on his
change to main.c, which seems unnecessary to me.)
2000-05-03 23:44:39 +00:00
Guido van Rossum 9f3712c6f1 Mark Hammond: new winreg module; updated dllbase file. 2000-03-28 20:37:15 +00:00