dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] pnet ChangeLog cscc/common/cc_main.c cscc/cs_ma...


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] pnet ChangeLog cscc/common/cc_main.c cscc/cs_ma...
Date: Sun, 03 Aug 2008 21:49:14 +0000

CVSROOT:        /cvsroot/dotgnu-pnet
Module name:    pnet
Changes by:     Klaus Treichel <ktreichel>      08/08/03 21:49:13

Modified files:
        .              : ChangeLog 
        cscc/common    : cc_main.c 
        cscc           : cs_main.c 
        engine         : engine.h ilrun.c process.c 
        image          : context.c image.c image.h 
        include        : il_engine.h il_image.h 

Log message:
        Add basic infrastructure for handling AppDomains in the engine.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3551&r2=1.3552
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/common/cc_main.c?cvsroot=dotgnu-pnet&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/cs_main.c?cvsroot=dotgnu-pnet&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/engine.h?cvsroot=dotgnu-pnet&r1=1.122&r2=1.123
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/ilrun.c?cvsroot=dotgnu-pnet&r1=1.60&r2=1.61
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/process.c?cvsroot=dotgnu-pnet&r1=1.74&r2=1.75
http://cvs.savannah.gnu.org/viewcvs/pnet/image/context.c?cvsroot=dotgnu-pnet&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/pnet/image/image.c?cvsroot=dotgnu-pnet&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pnet/image/image.h?cvsroot=dotgnu-pnet&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/pnet/include/il_engine.h?cvsroot=dotgnu-pnet&r1=1.50&r2=1.51
http://cvs.savannah.gnu.org/viewcvs/pnet/include/il_image.h?cvsroot=dotgnu-pnet&r1=1.22&r2=1.23

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3551
retrieving revision 1.3552
diff -u -b -r1.3551 -r1.3552
--- ChangeLog   3 Aug 2008 11:31:41 -0000       1.3551
+++ ChangeLog   3 Aug 2008 21:49:12 -0000       1.3552
@@ -1,11 +1,63 @@
 2008-08-03  Klaus Treichel  <address@hidden>
 
+       * cscc/common/cc_main.c (InitCodeGen): Pass an array that can safely be
+       modified and freed of the passed library directories to
+       ILContextSetLibraryDirs because they will be freed on context 
destruction
+       now.
+
+       * cscc/cs_main.c (CCPluginInit): Remove erroneous comment about nothing
+       to do.
+
+       * engine/engine.h: Add friendlyName member to the ILExecProcess. Add 
macro
+       _ILExecProcessGetFriendlyName for access to the new member.
+       Fix prototype of ILExecEngineCreate,
+
+       * engine/ilrun.c (main): Fill the array of library paths with allocated
+       copies of the args because they might be modified and freed by the
+       application.
+
+       * engine/process.c (ILExecProcessSetFriendlyName,
+       ILExecProcessSetFriendlyName): Add getter and setter for the 
friendlyName
+       member.
+
+       * image/context.c (PathListFree): Add function to free the memory used 
by
+       a path list.
+       (ILContextDestroy): Free the new introduced members.
+       (ILContextSetLibraryDirs): Free the old library dirs.
+       (ILContextSetApplicationBaseDir, ILContextGetApplicationBaseDir,
+       ILContextSetCacheDir, ILContextGetCacheDir, ILContextGetDynamicBaseDir,
+       ILContextSetDynamicBaseDir, ILContextGetLibraryDirs,
+       ILContextClearLibraryDirs, ILContextSetRelativeSearchDir,
+       ILContextGetRelativeSearchDir, ILContextSetShadowCopyDirs,
+       ILContextGetShadowCopyDirs, ILContextClearShadowCopyDirs,
+       ILContextSetShadowCopyFiles, ILContextGetShadowCopyFiles): Add functions
+       to manage the new introduced members.
+
+       * image/image.c (ILImageGetFileName): Add function to get the filename 
of
+       the image.
+
+       * image/image.h: Add members applicationBaseDir, relativeSearchDir,
+       cacheDir, dynamicBaseDir, shadowCopyFiles and shadowCopyDirs to the
+       ILContext struct.
+
        * image/link.c (TestPathForFile): Avoid adding an additional path 
separator
        if the last character in the path is allready one.
        (ILPinvokeResolveModule): Fix a compiler warning (posn is used only on 
non
        windows platforms). Look for the libraries starting with cyg instead of 
lib
        on cygwin systems too. 
 
+       * include/il_engine.h (ILExecProcessSetFriendlyName,
+       ILExecProcessGetFriendlyName): Add prototypes.
+
+       * include/il_image.h (ILContextSetApplicationBaseDir,
+       ILContextGetApplicationBaseDir, ILContextSetCacheDir,
+       ILContextGetCacheDir, ILContextGetDynamicBaseDir,
+       ILContextSetDynamicBaseDir, ILContextGetLibraryDirs,
+       ILContextClearLibraryDirs, ILContextSetRelativeSearchDir,
+       ILContextGetRelativeSearchDir, ILContextSetShadowCopyDirs,
+       ILContextGetShadowCopyDirs, ILContextClearShadowCopyDirs,
+       ILContextSetShadowCopyFiles, ILContextGetShadowCopyFiles): Add 
prototypes.
+: 
 2008-07-31  Klaus Treichel  <address@hidden>
 
        * support/hb_gc.c (ILGCRunFunc): Use the new functions for registering

Index: cscc/common/cc_main.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/common/cc_main.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- cscc/common/cc_main.c       1 Jun 2007 11:08:51 -0000       1.39
+++ cscc/common/cc_main.c       3 Aug 2008 21:49:12 -0000       1.40
@@ -571,7 +571,35 @@
           references can be resolved properly */
        if(num_link_dirs)
        {
-               ILContextSetLibraryDirs(CCCodeGen.context, link_dirs, 
num_link_dirs);
+               char **libraryDirs;
+               int numLibraryDirs = 0;
+               int current;
+
+               libraryDirs = (char **)ILMalloc(sizeof(char *) * num_link_dirs);
+               if(!libraryDirs)
+               {
+                       return 1;
+               }
+               for(current = 0; current < num_link_dirs; current++)
+               {
+                       if(link_dirs[current])
+                       {
+                               char *dir = ILMalloc(strlen(link_dirs[current]) 
+ 1);
+                               if(dir)
+                               {
+                                       strcpy(dir, link_dirs[current]);
+                                       libraryDirs[numLibraryDirs++] = dir;
+                               }
+                       }
+               }
+               if(numLibraryDirs)
+               {
+                       ILContextSetLibraryDirs(CCCodeGen.context, libraryDirs, 
numLibraryDirs);
+               }
+               else
+               {
+                       ILFree(libraryDirs);
+               }
        }
 
        /* Load all of the other libraries, in reverse order */

Index: cscc/cs_main.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/cs_main.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- cscc/cs_main.c      20 Sep 2007 20:04:16 -0000      1.25
+++ cscc/cs_main.c      3 Aug 2008 21:49:12 -0000       1.26
@@ -44,7 +44,6 @@
 
 int CCPluginInit(void)
 {
-       /* Nothing to do here */
        if(CCStringListContains(extension_flags, num_extension_flags,
                                                        "metadata-only"))
        {

Index: engine/engine.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/engine.h,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -b -r1.122 -r1.123
--- engine/engine.h     2 Apr 2007 21:54:23 -0000       1.122
+++ engine/engine.h     3 Aug 2008 21:49:12 -0000       1.123
@@ -258,6 +258,9 @@
        /* Hash table that contains all intern'ed strings within the system */
        void               *internHash;
 
+       /* name of this appDomain / ILExecProcess */
+       char               *friendlyName;
+
        /* linked list of class private data */
        /* This is supposed to prevent them to be collected */
        /* when they are alloceted using GC_MALLOC. */
@@ -354,6 +357,14 @@
 #endif
 
 /*
+ * Get the display name if this AppDomain.
+ * The caller has to make sure that this string exists for the
+ * time it is used. It might be destroyed if the Set function is
+ * called by an other thread.
+ */
+#define _ILExecProcessGetFriendlyName(process) ((process)->friendlyName)
+
+/*
  * Information that is stored in a stack call frame.
  * Offsets are used to refer to the stack instead of
  * pointers.  This allows the stack to be realloc'ed,
@@ -567,7 +578,7 @@
  * Create a new execution engine.
  * Returns the ILExecEngine or 0 if the function fails.
  */
-ILExecEngine *ILExecEngineCreate();
+ILExecEngine *ILExecEngineCreate(unsigned long stackSize);
 
 /*
  * Let the thread return from an other ILExecProcess and restore the saved

Index: engine/ilrun.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/ilrun.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- engine/ilrun.c      20 Dec 2007 09:37:23 -0000      1.60
+++ engine/ilrun.c      3 Aug 2008 21:49:13 -0000       1.61
@@ -250,7 +250,12 @@
                        {
                                if(libraryDirs != 0)
                                {
-                                       libraryDirs[numLibraryDirs++] = param;
+                                       char *path = (char 
*)ILMalloc(strlen(param) + 1);
+                                       if(path)
+                                       {
+                                               strcpy(path, param);
+                                               libraryDirs[numLibraryDirs++] = 
path;
+                                       }
                                }
                        }
                        break;

Index: engine/process.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/process.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -b -r1.74 -r1.75
--- engine/process.c    12 Oct 2007 15:07:09 -0000      1.74
+++ engine/process.c    3 Aug 2008 21:49:13 -0000       1.75
@@ -135,6 +135,7 @@
        process->gcHandles = 0;
        process->entryImage = 0;
        process->internalClassTable = 0;
+       process->friendlyName = 0;
        process->firstClassPrivate = 0;
 #ifdef IL_CONFIG_DEBUG_LINES
        process->debugHookFunc = 0;
@@ -567,6 +568,13 @@
        }
 #endif
 
+       /* free the friendly name if available */
+       if(process->friendlyName != 0)
+       {
+               ILFree(process->friendlyName);
+               process->friendlyName = 0;
+       }
+
        /* Free the process block itself */
        ILGCFreePersistent(process);
 
@@ -873,6 +881,20 @@
        return mainArgs;
 }
 
+void ILExecProcessSetFriendlyName(ILExecProcess *process, char *friendlyName)
+{
+       if(process->friendlyName && (process->friendlyName != friendlyName))
+       {
+               ILFree(process->friendlyName);
+       }
+       process->friendlyName = friendlyName;
+}
+
+char *ILExecProcessGetFriendlyName(ILExecProcess *process)
+{
+       return _ILExecProcessGetFriendlyName(process);
+}
+
 #ifndef IL_CONFIG_APPDOMAINS
 int ILExecProcessAddInternalCallTable(ILExecProcess* process, 
                                        const ILEngineInternalClassInfo* 
internalClassTable,

Index: image/context.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/context.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- image/context.c     20 Sep 2004 06:44:23 -0000      1.18
+++ image/context.c     3 Aug 2008 21:49:13 -0000       1.19
@@ -25,6 +25,29 @@
 #endif
 
 /*
+ * Free a path list and the containing paths.
+ */
+static void PathListFree(char **dirs, int numDirs)
+{
+       if(dirs)
+       {
+               if(numDirs > 0)
+               {
+                       int i; /* a loop counter */
+                       for(i = 0; i < numDirs; i++)
+                       {
+                               if(dirs[i])
+                               {
+                                       ILFree(dirs[i]);
+                               }
+                       }
+               }
+               /* we don't know anything about the size so free at least the 
array */
+               ILFree(dirs);
+       }
+}
+
+/*
  * Hash a string, while ignoring case.
  */
 static unsigned long HashIgnoreCase(unsigned long start,
@@ -284,6 +307,24 @@
                ILFree(context->redoItems);
        }
 
+       /* destroy the list of search directories */
+       PathListFree(context->libraryDirs, context->numLibraryDirs);
+
+       /* destroy the list of shadow copy directories */
+       PathListFree(context->shadowCopyDirs, context->numShadowCopyDirs);
+
+       /* destroy the cache directory */
+       if(context->cacheDir)
+       {
+               ILFree(context->cacheDir);
+       }
+
+       /* destroy the applicationBaseDir */
+       if(context->applicationBaseDir)
+       {
+               ILFree(context->applicationBaseDir);
+       }
+
        /* Destroy the context itself */
        ILFree(context);
 }
@@ -493,14 +534,137 @@
        return context->userData;
 }
 
+void ILContextSetApplicationBaseDir(ILContext *context, char 
*applicationBaseDir)
+{
+       if(context->applicationBaseDir &&
+          (context->applicationBaseDir != applicationBaseDir))
+       {
+               ILFree(context->applicationBaseDir);
+       }
+       context->applicationBaseDir = applicationBaseDir;
+
+}
+
+const char *ILContextGetApplicationBaseDir(ILContext *context)
+{
+       return context->applicationBaseDir;
+}
+
+void ILContextSetCacheDir(ILContext *context, char *cacheDir)
+{
+       if(context->cacheDir && (context->cacheDir != cacheDir))
+       {
+               ILFree(context->cacheDir);
+       }
+       context->cacheDir = cacheDir;
+}
+
+const char *ILContextGetCacheDir(ILContext *context)
+{
+       return context->cacheDir;
+}
+
+void ILContextSetDynamicBaseDir(ILContext *context, char *dynamicBaseDir)
+{
+       if(context->dynamicBaseDir && (context->dynamicBaseDir != 
dynamicBaseDir))
+       {
+               ILFree(context->dynamicBaseDir);
+       }
+       context->dynamicBaseDir = dynamicBaseDir;
+}
+
+const char *ILContextGetDynamicBaseDir(ILContext *context)
+{
+       return context->dynamicBaseDir;
+}
+
 void ILContextSetLibraryDirs(ILContext *context,
                                                         char **libraryDirs,
                                                         int numLibraryDirs)
 {
+       if(context->libraryDirs && (context->libraryDirs != libraryDirs))
+       {
+               PathListFree(context->libraryDirs, context->numLibraryDirs);
+       }
        context->libraryDirs = libraryDirs;
        context->numLibraryDirs = numLibraryDirs;
 }
 
+void ILContextGetLibraryDirs(ILContext *context,
+                                                        char ***libraryDirs,
+                                                        int *numLibraryDirs)
+{
+       *libraryDirs = context->libraryDirs;
+       *numLibraryDirs = context->numLibraryDirs;
+}
+
+void ILContextClearLibraryDirs(ILContext *context)
+{
+       if(context->libraryDirs)
+       {
+               PathListFree(context->libraryDirs, context->numLibraryDirs);
+       }
+       context->libraryDirs = 0;
+       context->numLibraryDirs = 0;
+}
+
+void ILContextSetRelativeSearchDir(ILContext *context, char *relativeSearchDir)
+{
+       if(context->relativeSearchDir &&
+          (context->relativeSearchDir != relativeSearchDir))
+       {
+               ILFree(context->relativeSearchDir);
+       }
+       context->relativeSearchDir = relativeSearchDir;
+
+}
+
+const char *ILContextGetRelativeSearchDir(ILContext *context)
+{
+       return context->relativeSearchDir;
+}
+
+void ILContextSetShadowCopyDirs(ILContext *context,
+                                                                char 
**shadowCopyDirs,
+                                                                int 
numShadowCopyDirs)
+{
+       if(context->shadowCopyDirs &&
+         (context->numShadowCopyDirs != numShadowCopyDirs))
+       {
+               PathListFree(context->shadowCopyDirs, 
context->numShadowCopyDirs);
+       }
+       context->shadowCopyDirs = shadowCopyDirs;
+       context->numShadowCopyDirs = numShadowCopyDirs;
+}
+
+void ILContextGetShadowCopyDirs(ILContext *context,
+                                                               char 
***shadowCopyDirs,
+                                                               int 
*numShadowCopyDirs)
+{
+       *shadowCopyDirs = context->shadowCopyDirs;
+       *numShadowCopyDirs = context->numShadowCopyDirs;
+}
+
+void ILContextClearShadowCopyDirs(ILContext *context)
+{
+       if(context->shadowCopyDirs)
+       {
+               PathListFree(context->shadowCopyDirs, 
context->numShadowCopyDirs);
+       }
+       context->shadowCopyDirs = 0;
+       context->numShadowCopyDirs = 0;
+}
+
+void ILContextSetShadowCopyFiles(ILContext *context, int shadowCopyFiles)
+{
+       context->shadowCopyFiles = shadowCopyFiles;
+}
+
+int ILContextGetShadowCopyFiles(ILContext *context)
+{
+       return context->shadowCopyFiles;
+}
+
 #ifdef __cplusplus
 };
 #endif

Index: image/image.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/image.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- image/image.c       28 Jul 2002 23:26:20 -0000      1.5
+++ image/image.c       3 Aug 2008 21:49:13 -0000       1.6
@@ -144,6 +144,11 @@
        return image->len;
 }
 
+const char *ILImageGetFileName(ILImage *image)
+{
+       return image->filename;
+}
+
 unsigned long ILImageGetSectionAddr(ILImage *image, int section)
 {
        unsigned long virtAddr = 0;

Index: image/image.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/image.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- image/image.h       13 Sep 2007 18:47:46 -0000      1.39
+++ image/image.h       3 Aug 2008 21:49:13 -0000       1.40
@@ -86,6 +86,25 @@
        char              **libraryDirs;
        int                             numLibraryDirs;
 
+       /* Base directory of the application */
+       char               *applicationBaseDir;
+
+       /* Directory relative to applicationBaseDir to search for assemblies */
+       char               *relativeSearchDir;
+
+       /* cache path for shadow copies */
+       char               *cacheDir;
+
+       /* Directory where dynamically created assemblies are stored and 
accessed */
+       char               *dynamicBaseDir;
+
+       /* Flag if shadow copying is enabled */
+       int                             shadowCopyFiles;
+
+       /* Directory names that are to be cached */
+       char              **shadowCopyDirs;
+       int                             numShadowCopyDirs;
+
        /* Hash table to keeps track of valid namespaces */
        ILHashTable        *namespaceHash;
 

Index: include/il_engine.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/include/il_engine.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- include/il_engine.h 5 May 2005 10:16:16 -0000       1.50
+++ include/il_engine.h 3 Aug 2008 21:49:13 -0000       1.51
@@ -267,6 +267,20 @@
 ILContext *ILExecProcessGetContext(ILExecProcess *process);
 
 /*
+ * Set the display name if this AppDomain.
+ * The old friendlyName will be freed.
+ */
+void ILExecProcessSetFriendlyName(ILExecProcess *process, char *friendlyName);
+
+/*
+ * Get the display name if this AppDomain.
+ * The caller has to make sure that this string exists for the
+ * time it is used. It might be destroyed if the Set function is
+ * called by an other thread.
+ */
+char *ILExecProcessGetFriendlyName(ILExecProcess *process);
+
+/*
  * Get the "main" thread for a process.
  */
 ILExecThread *ILExecProcessGetMain(ILExecProcess *process);

Index: include/il_image.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/include/il_image.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- include/il_image.h  23 Oct 2004 03:24:24 -0000      1.22
+++ include/il_image.h  3 Aug 2008 21:49:13 -0000       1.23
@@ -156,23 +156,136 @@
 ILImage *ILContextGetSystem(ILContext *context);
 
 /*
+ * Set the base directory of the application.
+ * The old applicationBaseDir will be freed.
+ */
+ void ILContextSetApplicationBaseDir(ILContext *context, char 
*applicationBaseDir);
+
+/*
+ * Get the base directory of the application.
+ * The caller has to make sure that this string exists for the
+ * time it is used. It might be destroyed if the Set function is
+ * called by an other thread.
+ */
+const char *ILContextGetApplicationBaseDir(ILContext *context);
+
+/*
+ * Set the directory where the shadow copies will be copied to.
+ * The old cacheDir will be freed.
+ */
+void ILContextSetCacheDir(ILContext *context, char *cacheDir);
+
+/*
+ * Get the directory where the shadow copies will be copied to.
+ * The caller has to make sure that this string exists for the
+ * time it is used. It might be destroyed if the Set function is
+ * called by an other thread.
+ */
+const char *ILContextGetCacheDir(ILContext *context);
+
+/*
+ * Set the directory where dynamically created files are stored and
+ * accessed..
+ * The old dynamicBaseDir will be freed.
+ */
+void ILContextSetDynamicBaseDir(ILContext *context, char *dynamicBaseDir);
+
+/*
+ * Get the directory where dynamically created files are stored and
+ * accessed..
+ * The caller has to make sure that this string exists for the
+ * time it is used. It might be destroyed if the Set function is
+ * called by an other thread.
+ */
+const char *ILContextGetDynamicBaseDir(ILContext *context);
+
+/*
  * Set the list of directories to be used for library path
  * searching, before inspecting the standard directories.
- * It is assumed that the list will persist for the lifetime
- * of the context.
+ * The list and the paths must be allocated by ILMalloc. 
+ * The old list and the containing paths will be freed when
+ * this function is called again.
  */
 void ILContextSetLibraryDirs(ILContext *context,
                                                         char **libraryDirs,
                                                         int numLibraryDirs);
 
 /*
+ * Get the list of directories to be used for library path
+ * searching, before inspecting the standard directories.
+ * The caller has to make sure that the list and the paths
+ * will not be freed by an other thread calling the Set or
+ * Clear function.
+ */
+void ILContextGetLibraryDirs(ILContext *context,
+                                                        char ***libraryDirs,
+                                                        int *numLibraryDirs);
+
+/*
+ * Clear the list of directories to be used for library path
+ * searching.
+ * The old list and the containing paths will be freed.
+ */
+void ILContextClearLibraryDirs(ILContext *context);
+
+/*
+ * Get the directory relative to the applicationBaseDir where
+ * should be searched for Assemblies.
+ * The caller has to make sure that this string exists for the
+ * time it is used. It might be destroyed if the Set function is
+ * called by an other thread.
+ */
+const char *ILContextGetRelativeSearchDir(ILContext *context);
+
+/*
+ * Set the directory relative to the applicationBaseDir where
+ * should be searched for Assemblies.
+ * The old relativeSearchDir will be freed.
+ */
+void ILContextSetRelativeSearchDir(ILContext *context, char 
*relativeSearchDir);
+
+/*
+ * Set the list of directories that have to be cached in the
+ * directory specified in cacheDir.
+ * The list and the paths must be allocated by ILMalloc. 
+ * The old list and the containing paths will be freed when
+ * this function is called again.
+ */
+void ILContextSetShadowCopyDirs(ILContext *context,
+                                                                char 
**shadowCopyDirs,
+                                                                int 
numShadowCopyDirs);
+
+/*
+ * Get the list of directories that have to be cached in the
+ * directory specified in cacheDir.
+ * The caller has to make sure that the list and the paths
+ * will not be freed by an other thread calling the Set or
+ * Clear function.
+ */
+void ILContextGetShadowCopyDirs(ILContext *context,
+                                                               char 
***shadowCopyDirs,
+                                                               int 
*numShadowCopyDirs);
+
+/*
+ * Crear the list of directories that have to be cached.
+ * The old list and the containing paths will be freed.
+ */
+void ILContextClearShadowCopyDirs(ILContext *context);
+
+/*
+ * Set shadowCopyFiles to a 0 to disable shadow copies or a non null
+ * value to enable shadow copies.
+ */
+void ILContextSetShadowCopyFiles(ILContext *context, int shadowCopyFiles);
+
+/*
  *     Used by the engine to attach user data to the context instance.
  */
 void ILContextSetUserData(ILContext *context, void *userData);
 
 /*
-*      Used by the engine to get attached user data from the context instance.
-*/
+ * Used by the engine to get attached user data from the context instance.
+ */
 void *ILContextGetUserData(ILContext *context);
 
 /*
@@ -235,6 +348,11 @@
 void ILImageDestroy(ILImage *image);
 
 /*
+ * Get the filename from which an image was loaded.
+ */
+const char *ILImageGetFileName(ILImage *image);
+
+/*
  * Get the context associated with an IL image.
  */
 ILContext *ILImageToContext(ILImage *image);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]