]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/wxSWIG/swig_lib/malloc.i
added renderer.h/.cpp
[wxWidgets.git] / wxPython / wxSWIG / swig_lib / malloc.i
... / ...
CommitLineData
1//
2// $Header$
3//
4// malloc.i
5// Dave Beazley
6// March 24, 1996
7// SWIG file for memory management functions
8// (also contained in stdlib.i)
9//
10/* Revision History
11 * $Log$
12 * Revision 1.1 2002/04/29 19:56:49 RD
13 * Since I have made several changes to SWIG over the years to accomodate
14 * special cases and other things in wxPython, and since I plan on making
15 * several more, I've decided to put the SWIG sources in wxPython's CVS
16 * instead of relying on maintaining patches. This effectivly becomes a
17 * fork of an obsolete version of SWIG, :-( but since SWIG 1.3 still
18 * doesn't have some things I rely on in 1.1, not to mention that my
19 * custom patches would all have to be redone, I felt that this is the
20 * easier road to take.
21 *
22 * Revision 1.1.1.1 1999/02/28 02:00:53 beazley
23 * Swig1.1
24 *
25 * Revision 1.1 1996/05/22 17:27:01 beazley
26 * Initial revision
27 *
28 */
29
30%module malloc
31%{
32#include <stdlib.h>
33%}
34
35%section "Memory Allocation Module",
36 pre,info,after,nosort,chop_left=3,chop_right=0,chop_top=0,chop_bottom=0,skip=1
37
38%text %{
39%include malloc.i
40
41This module provides access to a few basic C memory management functions.
42All functions return void pointers, but realloc() and free() will operate
43on any sort of pointer. Sizes should be specified in bytes.
44%}
45
46void *calloc(unsigned nobj, unsigned size);
47/* Returns a pointer to a space for an array of nobj objects, each with
48 size bytes. Returns NULL if the request can't be satisfied.
49 Initializes the space to zero bytes. */
50
51void *malloc(unsigned size);
52/* Returns a pointer to space for an object of size bytes. Returns NULL
53 upon failure. */
54
55void *realloc(void *ptr, unsigned size);
56/* Changes the size of the object pointed to by ptr to size bytes.
57 The contents will be unchanged up the minimum of the old and new
58 sizes. Returns a pointer to the new space of NULL upon failure,
59 in which case *ptr is unchanged. */
60
61void free(void *ptr);
62/* Deallocates the space pointed to by ptr. Does nothing if ptr is NULL.
63 ptr must be a space previously allocated by calloc, malloc, or realloc. */
64