You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by dl...@apache.org on 2007/08/12 23:10:11 UTC

svn commit: r565151 - /harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/classpath.h

Author: dlydick
Date: Sun Aug 12 14:10:11 2007
New Revision: 565151

URL: http://svn.apache.org/viewvc?view=rev&rev=565151
Log:
Added typedef (struct classpath_search) and changed
classpath_get_from_prchar() and classpath_get_from_cp_entry_utf()
prototypes to use it.

Added prototype for classpath_free_search_result().

Modified:
    harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/classpath.h

Modified: harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/classpath.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/classpath.h?view=diff&rev=565151&r1=565150&r2=565151
==============================================================================
--- harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/classpath.h (original)
+++ harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/classpath.h Sun Aug 12 14:10:11 2007
@@ -78,6 +78,7 @@
 "$URL$",
 "$Id$");
 
+#include "jar.h"
 
 /*!
  * @brief Delimiter betwen members of @b CLASSPATH string
@@ -108,10 +109,40 @@
 /*@} */
 
 
+/*!
+ * @brief Search result from examining @b CLASSPATH
+ *
+ *
+ * The result of classpath_get_from_cp_entry_utf() is either a class
+ * file or a Java archive file member class file.  One of these
+ * structure members will be @link #rnull rnull@endlink and one will
+ * contain a valid pointer.
+ *
+ * If it is a Java archive file member, that pointer contains the state
+ * <i>of an open JAR file</i>, so it @e must be examined, at least
+ * enough to close the file handle.  Otherwise, open file handles will
+ * accumulate.
+ *
+ * One member or the other will be non-null.  If both members are null,
+ * then the class was not found in this @b CLASSPATH entry.
+ *
+ * In both cases, non-null the pointer will need to be freed when
+ * processing of that class is done.
+ *
+ */
+typedef struct
+{
+    rchar     *classfile_name;        /**< Name of class file defining
+                                           this class */
+
+    jar_state *jarfile_member_state;  /**< State of open Java archive
+                                           file containing this class */
+
+} classpath_search;
+
 
 /* Prototypes for functions in 'classpath.c' */ 
 extern rvoid classpath_init(rvoid);
-extern rvoid classpath_shutdown(rvoid);
 
 extern rboolean classpath_isjar(rchar *pclasspath);
 
@@ -120,11 +151,14 @@
 extern
   rchar *classpath_external2internal_classname_inplace(rchar *inoutbfr);
 
-extern rchar *classpath_get_from_prchar(rchar *clsname);
+extern classpath_search *classpath_get_from_prchar(rchar *clsname);
 
-extern rchar *classpath_get_from_cp_entry_utf(
+extern classpath_search *classpath_get_from_cp_entry_utf(
                                             cp_info_mem_align *clsname);
 
+extern rvoid classpath_free_search_result(classpath_search *pcpsr);
+
+extern rvoid classpath_shutdown(rvoid);
 
 #endif /* _classpath_h_included_ */