Index: /trunk/doc/pslib/ChangeLogSDRS.tex
===================================================================
--- /trunk/doc/pslib/ChangeLogSDRS.tex	(revision 4108)
+++ /trunk/doc/pslib/ChangeLogSDRS.tex	(revision 4109)
@@ -1,3 +1,3 @@
-%%% $Id: ChangeLogSDRS.tex,v 1.125 2005-06-02 21:13:29 jhoblitt Exp $
+%%% $Id: ChangeLogSDRS.tex,v 1.126 2005-06-04 01:30:18 price Exp $
 
 \subsection{Changes from version 00 to version 01}
@@ -669,3 +669,4 @@
 \item add \code{PS_META_NULL}
 \item add \code{NULL} keyword to ``Configuration files''
-\end{itemize}
+\item Added \code{psMemCheckTYPE} functions, for many values of \code{TYPE}.
+\end{itemize}
Index: /trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- /trunk/doc/pslib/psLibSDRS.tex	(revision 4108)
+++ /trunk/doc/pslib/psLibSDRS.tex	(revision 4109)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.261 2005-06-02 21:10:42 jhoblitt Exp $
+%%% $Id: psLibSDRS.tex,v 1.262 2005-06-04 01:30:18 price Exp $
 \documentclass[panstarrs,spec]{panstarrs}
 
@@ -1318,4 +1318,61 @@
 We discuss the application of \code{psType} in more detail in
 section~\ref{sec:arithmetic}.  
+
+\subsection{Type checking}
+
+Several of the collections contain data using a \code{void*} pointer.
+This makes it difficult to ensure that data coming off a collection is
+of a particular, desired type.  Nevertheless, there is a way of
+identifying the type of a pointer pulled off a collection --- the
+registered deallocator function stored in the \code{psMemBlock}.  We
+specify functions below, one for each of the major types in psLib,
+that check the type on a particular pointer, returning \code{true} if
+the \code{ptr} matches the desired type, as determined from the
+registered deallocator function.  These functions may be implemented
+as macros if that is deemed convenient.
+
+\begin{prototype}
+bool psMemCheckArray(psPtr ptr);
+bool psMemCheckBitSet(psPtr ptr);
+bool psMemCheckCell(psPtr ptr);
+bool psMemCheckChip(psPtr ptr);
+bool psMemCheckCube(psPtr ptr);
+bool psMemCheckFits(psPtr ptr);
+bool psMemCheckHash(psPtr ptr);
+bool psMemCheckHistogram(psPtr ptr);
+bool psMemCheckImage(psPtr ptr);
+bool psMemCheckKernel(psPtr ptr);
+bool psMemCheckList(psPtr ptr);
+bool psMemCheckLookupTable(psPtr ptr);
+bool psMemCheckMetadata(psPtr ptr);
+bool psMemCheckMetadataItem(psPtr ptr);
+bool psMemCheckMinimization(psPtr ptr);
+bool psMemCheckPixels(psPtr ptr);
+bool psMemCheckPlane(psPtr ptr);
+bool psMemCheckPlaneDistort(psPtr ptr);
+bool psMemCheckPlaneTransform(psPtr ptr);
+bool psMemCheckPolynomial1D(psPtr ptr);
+bool psMemCheckPolynomial2D(psPtr ptr);
+bool psMemCheckPolynomial3D(psPtr ptr);
+bool psMemCheckPolynomial4D(psPtr ptr);
+bool psMemCheckProjection(psPtr ptr);
+bool psMemCheckReadout(psPtr ptr);
+bool psMemCheckRegion(psPtr ptr);
+bool psMemCheckScalar(psPtr ptr);
+bool psMemCheckSphere(psPtr ptr);
+bool psMemCheckSphereTransform(psPtr ptr);
+bool psMemCheckSpline1D(psPtr ptr);
+bool psMemCheckStats(psPtr ptr);
+bool psMemCheckTime(psPtr ptr);
+bool psMemCheckVector(psPtr ptr);
+\end{prototype}
+
+For user convenience, we also specify a one-stop shop which simply
+executes the appropriate \code{psMemCheckWhatever} function according
+to the \code{type}:
+
+\begin{prototype}
+bool psMemCheckType(psType type, psPtr ptr);
+\end{prototype}
 
 \subsection{Simple Scalars}
