  
  class_entry_type:
  		T_CLASS			{  $$.u.constant.value.lval = 0; }
-@@ -326,6 +388,22 @@
+@@ -326,6 +389,27 @@
  	|	interface_list ',' fully_qualified_class_name { zend_do_implements_interface(&$3 TSRMLS_CC); }
  ;
  
 +unticked_enum_declaration_statement:
 +		T_ENUM T_STRING '{' { zend_do_begin_enum_declaration(&$2 TSRMLS_CC); }
-+			enum_declaration_list 
++			enum_inner_statement_list 
 +		'}' { zend_do_end_enum_declaration(TSRMLS_C); }
++;
++
++enum_inner_statement_list:
++		enum_declaration_list
++	| 	enum_declaration_list ';' class_statement_list
 +;
 +
 +enum_declaration_list:

 #include "zend_stream.h"
 typedef struct _zend_utility_functions {
 	void (*error_function)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0);
Index: zend_API.c
===================================================================
RCS file: /repository/ZendEngine2/zend_API.c,v
retrieving revision 1.278
diff -u -r1.278 zend_API.c
--- zend_API.c	17 Feb 2005 21:05:04 -0000	1.278
+++ zend_API.c	6 Mar 2005 12:10:12 -0000
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id$ */
+/* $Id$ */
 
 #include "zend.h"
 #include "zend_execute.h"
@@ -1319,6 +1319,9 @@
 			internal_function->return_reference = ptr->arg_info[0].return_reference;
 		} else {

+	char *package = NULL;
+	char *lc_name = NULL;
+	int package_len;
+
+	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &package, &package_len) == FAILURE) {
+		return;
+	}
 
-	if (ZEND_NUM_ARGS() != 0) {
-		ZEND_WRONG_PARAM_COUNT();
+	/* Create lowercase package name and concatenate a "~" */
+	if (package) {
+		package_len++;
