-- Patch.mesa
-- Last changed by Doug Wyatt, September 11, 1980 6:45 PM
DIRECTORY
Area USING [Handle],
Pipe USING [Handle];
Patch: DEFINITIONS = {
Handle: TYPE = LONG POINTER TO Object;
New: PROC[Area.Handle] RETURNS[Handle];
NewPipe: PROC[self: Handle, ipipe,opipe: Pipe.Handle]
RETURNS[Pipe.Handle] = INLINE {
RETURN[self.procs.NewPipe[self,ipipe,opipe]]
};
Copy: PROC[self: Handle] RETURNS[Handle] = INLINE {
RETURN[self.procs.Copy[self]]
};
Free: PROC[selfPtr: LONG POINTER TO Handle] = INLINE {
self: Handle=selfPtr↑; selfPtr↑←NIL; self.procs.Free[self]
};
Object: PRIVATE TYPE = RECORD [
procs: LONG POINTER TO READONLY Procs,
data: LONG POINTER TO Data
];
Procs: PRIVATE TYPE = RECORD [
NewPipe: PROC[self: Handle, ipipe,opipe: Pipe.Handle]
RETURNS[Pipe.Handle],
Copy: PROC[self: Handle] RETURNS[Handle],
Free: PROC[self: Handle]
];
Data: PRIVATE TYPE;
PatchImpl: PROGRAM;
}.