From ace02c1d8fb3ae997efbac0a12d3bd0533bd93d9 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 5 Oct 2008 12:24:55 +0200 Subject: Move plugin global data allocation back to the module --- vfs/uVFSprototypes.pas | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'vfs/uVFSprototypes.pas') diff --git a/vfs/uVFSprototypes.pas b/vfs/uVFSprototypes.pas index df45ecb..6959a7b 100644 --- a/vfs/uVFSprototypes.pas +++ b/vfs/uVFSprototypes.pas @@ -135,15 +135,13 @@ type PVFSLogFunc = ^TVFSLogFunc; TVFSLogFunc = procedure(S: PChar); cdecl; - TVFSAllocNeeded = function: integer; cdecl; - // Returns sizeof internal structure of TVFSGlobs in the plugin - host application will then allocate corresponding amount of memory - TVFSInit = procedure (g:TVFSGlobs; LogFunc: PVFSLogFunc); cdecl; - // Performs intialization of the plugin and sets the log function for the module (assume allocated memory for TVFSGlobs) - TVFSDestroy = procedure (g:TVFSGlobs); cdecl; + TVFSNew = function (LogFunc: PVFSLogFunc): TVFSGlobs; cdecl; + // Allocates memory for the globs structure and performs intialization of the plugin + TVFSFree = procedure (g: TVFSGlobs); cdecl; // Performs cleanup and destroy all objects TVFSVersion = function: integer; cdecl; // Returns API Version; the host application checks for this number and if the returned number is less than a value required by the host application, the module is not loaded - // The current version for this API is '3' - please use the constant declared above as return value + // Please use the cVFSVersion constant as return value TVFSGetInfo = function: TVFSInfo; cdecl; // Returns the structure with module info TVFSGetPrefix = function (g:TVFSGlobs): PChar; cdecl; -- cgit v1.2.3