aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-03-07 23:03:32 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-03-07 23:03:32 +0000
commit86c2eadb185b1a0edcf6419957df0b0816e3c21a (patch)
tree6884e732a88bd7913d837fcda2e7fb8e88848fdc /src
parentdffb88b024e4f87342ce1bbb4010eae47833f94a (diff)
downloadpostgresql-86c2eadb185b1a0edcf6419957df0b0816e3c21a.tar.gz
postgresql-86c2eadb185b1a0edcf6419957df0b0816e3c21a.zip
Modify mcxt.h so that it doesn't pull in half of creation.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/hash/dynahash.c3
-rw-r--r--src/include/nodes/memnodes.h12
-rw-r--r--src/include/utils/mcxt.h11
3 files changed, 19 insertions, 7 deletions
diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c
index f9d87120535..dd601bee742 100644
--- a/src/backend/utils/hash/dynahash.c
+++ b/src/backend/utils/hash/dynahash.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.20 1999/03/06 21:17:56 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.21 1999/03/07 23:03:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,6 +49,7 @@
#include "utils/mcxt.h"
#endif /* !FRONTEND */
#include "utils/palloc.h"
+#include "utils/memutils.h"
/*
* Fast arithmetic, relying on powers of 2,
diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h
index 0bd7f9266ae..a44e1fb31a7 100644
--- a/src/include/nodes/memnodes.h
+++ b/src/include/nodes/memnodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: memnodes.h,v 1.10 1999/02/13 23:21:38 momjian Exp $
+ * $Id: memnodes.h,v 1.11 1999/03/07 23:03:31 tgl Exp $
*
* XXX the typedefs in this file are different from the other ???nodes.h;
* they are pointers to structures instead of the structures themselves.
@@ -60,7 +60,9 @@ typedef struct MemoryContextData
{
NodeTag type;
MemoryContextMethods method;
-} *MemoryContext;
+} MemoryContextData;
+
+/* utils/mcxt.h contains typedef struct MemoryContextData *MemoryContext */
/* think about doing this right some time but we'll have explicit fields
for now -ay 10/94 */
@@ -71,9 +73,11 @@ typedef struct GlobalMemoryData
AllocSetData setData;
char *name;
OrderedElemData elemData;
-} *GlobalMemory;
+} GlobalMemoryData;
+
+/* utils/mcxt.h contains typedef struct GlobalMemoryData *GlobalMemory */
-typedef MemoryContext *PortalMemoryContext;
+typedef struct MemoryContextData *PortalMemoryContext;
typedef struct PortalVariableMemoryData
{
diff --git a/src/include/utils/mcxt.h b/src/include/utils/mcxt.h
index 01ff7b7f119..6db5619a926 100644
--- a/src/include/utils/mcxt.h
+++ b/src/include/utils/mcxt.h
@@ -6,14 +6,21 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: mcxt.h,v 1.12 1999/02/13 23:22:24 momjian Exp $
+ * $Id: mcxt.h,v 1.13 1999/03/07 23:03:31 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef MCXT_H
#define MCXT_H
-#include <nodes/memnodes.h>
+/* These types are declared in nodes/memnodes.h, but most users of memory
+ * allocation should just treat them as abstract types, so we do not provide
+ * the struct contents here.
+ */
+
+typedef struct MemoryContextData *MemoryContext;
+typedef struct GlobalMemoryData *GlobalMemory;
+
extern MemoryContext CurrentMemoryContext;
extern MemoryContext TopMemoryContext;