mirror of https://github.com/red-prig/fpPS4.git
33 lines
467 B
Plaintext
33 lines
467 B
Plaintext
unit CharStream;
|
|
|
|
{$mode ObjFPC}{$H+}
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes;
|
|
|
|
type
|
|
TPCharStream=class(TCustomMemoryStream)
|
|
public
|
|
constructor Create(P:PChar;len:SizeUint); virtual; overload;
|
|
procedure SetNew(P:PChar;len:SizeUint);
|
|
end;
|
|
|
|
implementation
|
|
|
|
constructor TPCharStream.Create(P:PChar;len:SizeUint);
|
|
begin
|
|
inherited Create;
|
|
SetPointer(P,len);
|
|
end;
|
|
|
|
procedure TPCharStream.SetNew(P:PChar;len:SizeUint);
|
|
begin
|
|
SetPosition(0);
|
|
SetPointer(P,len);
|
|
end;
|
|
|
|
end.
|
|
|