Commit Graph

41 Commits

Author SHA1 Message Date
Martin v. Löwis 6819210b9e PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
2007-07-21 06:55:02 +00:00
Georg Brandl 96a8c3954c Make use of METH_O and METH_NOARGS where possible.
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
2006-05-29 21:04:52 +00:00
Thomas Wouters a5fa2a8a13 Fix gcc (4.0.x) warning about use of uninitialized variable. 2006-03-01 22:54:36 +00:00
Martin v. Löwis 18e165558b Merge ssize_t branch. 2006-02-15 17:27:45 +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
Andrew M. Kuchling ea271f2d5e [Bug #982806] The default argument for opening GDBM files is bogus. Patch #984672 by James Lamanna 2004-07-07 14:19:09 +00:00
Mark Hammond fe51c6d66e Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototype
for Py_Main().

Thanks to Kalle Svensson and Skip Montanaro for the patches.
2002-08-02 02:27:13 +00:00
Jeremy Hylton 938ace69a0 staticforward bites the dust.
The staticforward define was needed to support certain broken C
compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the
static keyword when it was used with a forward declaration of a static
initialized structure.  Standard C allows the forward declaration with
static, and we've decided to stop catering to broken C compilers.  (In
fact, we expect that the compilers are all fixed eight years later.)

I'm leaving staticforward and statichere defined in object.h as
static.  This is only for backwards compatibility with C extensions
that might still use it.

XXX I haven't updated the documentation.
2002-07-17 16:30:39 +00:00
Martin v. Löwis 14f8b4cfcb Patch #568124: Add doc string macros. 2002-06-13 20:33:02 +00:00
Guido van Rossum 146483964e Patch supplied by Burton Radons for his own SF bug #487390: Modifying
type.__module__ behavior.

This adds the module name and a dot in front of the type name in every
type object initializer, except for built-in types (and those that
already had this).  Note that it touches lots of Mac modules -- I have
no way to test these but the changes look right.  Apologies if they're
not.  This also touches the weakref docs, which contains a sample type
object initializer.  It also touches the mmap test output, because the
mmap type's repr is included in that output.  It touches object.h to
put the correct description in a comment.
2001-12-08 18:02:58 +00:00
Tim Peters 885d457709 sprintf -> PyOS_snprintf in some "obviously safe" cases.
Also changed <>-style #includes to ""-style in some places where the
former didn't make sense.
2001-11-28 20:27:42 +00:00
Martin v. Löwis 00ff10cae4 Patch in bug report #477700: Fix memory leaks in gdbm & curses. 2001-11-11 14:24:05 +00:00
Tim Peters 5687ffe0c5 SF patch 404928: Support for next Cygwin gcc (2.95.2-8) 2001-02-28 16:44:18 +00:00
Neil Schemenauer e9e860faf3 Add support for gdbm2 open flags ('s' and 'u'). Add module constant
open_flags which contains the flags supported by gdbm.  Closes patch
#102802.
2000-12-17 07:14:13 +00:00
Guido van Rossum 8586991099 REMOVED all CWI, CNRI and BeOpen copyright markings.
This should match the situation in the 1.6b1 tree.
2000-09-01 23:29:29 +00:00
Thomas Wouters 58d0510245 ANSIfy some more forward declarations. 2000-07-24 14:43:35 +00:00
Fred Drake e3a41c653a ANSI-fy the sources.
Convert to using PyArg_ParseTuple() as appropriate to allow method names
in error messages.
Re-indent to four-space indentation.
2000-07-08 05:00:07 +00:00
Guido van Rossum ffcc3813d8 Change copyright notice - 2nd try. 2000-06-30 23:58:06 +00:00
Guido van Rossum fd71b9e9d4 Change copyright notice. 2000-06-30 23:50:40 +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 43713e5a28 Massive patch by Skip Montanaro to add ":name" to as many
PyArg_ParseTuple() format string arguments as possible.
2000-02-29 13:59:29 +00:00
Fred Drake da8d216eb2 Protect against core dumps in gdbm: don't allow access by key once the
database is closed.  Raise gdbm.error instead.

Bug report #198 submitted by Barry Haddow <bhaddow@orbism.com>.
2000-02-07 17:19:41 +00:00
Guido van Rossum 3886bb6997 Add DL_EXPORT() to all modules that could possibly be used
on BeOS or Windows.
1998-12-04 18:50:17 +00:00
Guido van Rossum 573788eef1 No need for (char *) cast from gdbm_strerror(). 1998-10-03 05:15:07 +00:00
Guido van Rossum b6e2a99aa6 Win32 port. Patches by Milton L. Hankins. 1998-10-03 05:13:27 +00:00
Guido van Rossum cef113c524 Don't allow unescaped newlines in doc strings. 1998-04-13 18:11:55 +00:00
Guido van Rossum bfc49e8c75 Doc strings added by Mitch Chapman.
Also got rid of some inconsistent change log comments near the top.
1998-03-03 22:02:24 +00:00
Guido van Rossum 0cb96de269 Apply two changes, systematically:
(1) Use PyErr_NewException("module.class", NULL, NULL) to create the
    exception object.

(2) Remove all calls to Py_FatalError(); instead, return or
    ignore the errors -- the import code now checks PyErr_Occurred()
    after calling a module's init function, so it's no longer a
    fatal error for the initialization to fail.

Also did some small cleanups, e.g. removed unnecessary test for
"already initialized" from initfpectl(), and unified
initposix()/initnt().

I haven't checked this very thoroughly, so while the changes are
pretty trivial -- beware of untested code!
1997-10-01 04:29:29 +00:00
Guido van Rossum 77eecfa94d Patches by AMK to check that the db is still open. 1997-07-17 22:56:01 +00:00
Roger E. Masse e5a9c8fa31 As per GvR recomendation, added support for a 'sync' attribute for the
GDBM module.
1997-03-25 17:39:56 +00:00
Roger E. Masse b15bef85a7 Renamed in a grand-ee-ous way! 1996-12-17 19:55:33 +00:00
Guido van Rossum d266eb460e New permission notice, includes CNRI. 1996-10-25 14:44:06 +00:00
Guido van Rossum 3be7140d31 Rewritten keys() and has_key() to avoid memory leaks. 1996-07-21 02:32:44 +00:00
Guido van Rossum e36e1fe516 support fast mode for gdmb 1996-01-26 21:08:01 +00:00
Guido van Rossum 66017aa1b8 fix leaks in keys(); fix bug in close() 1995-08-28 02:58:00 +00:00
Guido van Rossum 807b7bec06 normalized flag arg and made flag, mode default args; minor cosmetics 1995-07-07 22:37:11 +00:00
Guido van Rossum fbd30e9159 added firstkey(), nextkey(), reorganize() methods 1995-03-16 16:07:34 +00:00
Guido van Rossum b045afc711 plugged some memory leaks (Steve Clift) 1995-03-14 15:04:40 +00:00
Guido van Rossum 524b588553 Added 1995 to copyright message.
Setup.in: clarified Tk comments somewhat.
structmodule.c: use memcpy() instead of double precision assignment.
1995-01-04 19:10:35 +00:00
Sjoerd Mullender 2abc49458b Free was called with a struct as argument instead of a field from the
struct.
1994-10-13 09:11:13 +00:00
Guido van Rossum 4b4c664d2e * Modules/{Setup.in, gdbmmodule.c}, Doc/{lib,libgdbm}.tex: added
Anthony Baxter's gdbm module (derived from Jack's dbm module)
1994-08-08 08:06:37 +00:00