Index: trunk/psLib/src/sysUtils/psMemory.h
===================================================================
--- trunk/psLib/src/sysUtils/psMemory.h	(revision 2391)
+++ trunk/psLib/src/sysUtils/psMemory.h	(revision 3145)
@@ -12,6 +12,6 @@
  *  @ingroup MemoryManagement
  *
- *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-22 20:49:59 $
+ *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-07 23:26:24 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -127,9 +127,10 @@
  *  @see psFree 
  */
-#ifdef DOXYGEN
+#if defined(DOXYGEN) || defined(SWIG)
 psPtr psAlloc(size_t size       ///< Size required
              );
-#else
-
+#endif
+
+#ifndef DOXYGEN
 psPtr p_psAlloc(size_t size,    ///< Size required
                 const char *file,       ///< File of call
@@ -138,5 +139,8 @@
 
 /// Memory allocation. psAlloc sends file and line number to p_psAlloc.
+#ifndef SWIG
 #define psAlloc(size) p_psAlloc(size, __FILE__, __LINE__)
+#endif
+
 #endif
 
@@ -200,20 +204,23 @@
  *  @see psAlloc, psFree
  */
-#ifdef DOXYGEN
+#if defined(DOXYGEN) || defined(SWIG)
 psPtr psRealloc(
-    psPtr ptr                          ///< Pointer to re-allocate
-    size_t size,                       ///< Size required
-);
-#else
-
+    psPtr ptr,                          ///< Pointer to re-allocate
+    size_t size                         ///< Size required
+);
+#endif
+
+#ifndef DOXYGEN
 psPtr p_psRealloc(
     psPtr ptr,                         ///< Pointer to re-allocate
     size_t size,                       ///< Size required
     const char *file,                  ///< File of call
-    psS32 lineno                         ///< Line number of call
+    psS32 lineno                       ///< Line number of call
 );
 
 /// Memory re-allocation.  psRealloc sends file and line number to p_psRealloc.
+#ifndef SWIG
 #define psRealloc(ptr, size) p_psRealloc(ptr, size, __FILE__, __LINE__)
+#endif
 
 #endif
@@ -223,18 +230,21 @@
  *  @see psAlloc, psRealloc
  */
-#ifdef DOXYGEN
+#if defined(DOXYGEN) || defined(SWIG)
 void psFree(
-    psPtr ptr,                         ///< Pointer to free, if NULL, function returns immediately.
-);
-#else
-
+    psPtr ptr                          ///< Pointer to free, if NULL, function returns immediately.
+);
+#endif
+
+#ifndef DOXYGEN
 void p_psFree(
-    psPtr ptr,                        ///< Pointer to free
-    const char *file,                 ///< File of call
-    psS32 lineno                        ///< Line number of call
+    psPtr ptr,                         ///< Pointer to free
+    const char *file,                  ///< File of call
+    psS32 lineno                       ///< Line number of call
 );
 
 /// Free memory.  psFree sends file and line number to p_psFree.
-#define psFree(size) p_psFree(size, __FILE__, __LINE__)
+#ifndef SWIG
+#define psFree(ptr) p_psFree(ptr, __FILE__, __LINE__)
+#endif
 
 #endif
@@ -282,10 +292,11 @@
  *  @ingroup memRefCount
  */
-#ifdef DOXYGEN
+#if defined(DOXYGEN) || defined(SWIG)
 psPtr psMemIncrRefCounter(
     psPtr vptr                         ///< Pointer to increment refCounter, and return
 );
-#else
-
+#endif
+
+#ifndef DOXYGEN
 psPtr p_psMemIncrRefCounter(
     psPtr vptr,                        ///< Pointer to increment refCounter, and return
@@ -294,5 +305,8 @@
 );
 
+#ifndef SWIG
 #define psMemIncrRefCounter(vptr) p_psMemIncrRefCounter(vptr, __FILE__, __LINE__)
+#endif
+
 #endif
 
@@ -304,10 +318,11 @@
  *                   fully dereferenced.
  */
-#ifdef DOXYGEN
+#if defined(DOXYGEN) || defined(SWIG)
 psPtr psMemDecrRefCounter(
     psPtr vptr                         ///< Pointer to decrement refCounter, and return
 );
-#else
-
+#endif
+
+#ifndef DOXYGEN
 psPtr p_psMemDecrRefCounter(
     psPtr vptr,                        ///< Pointer to decrement refCounter, and return
@@ -316,5 +331,8 @@
 );
 
+#ifndef SWIG
 #define psMemDecrRefCounter(vptr) p_psMemDecrRefCounter(vptr, __FILE__, __LINE__)
+#endif
+
 #endif
 
