cvs: /php4/ext/xml php_xml.h xml.c

From: Date: Thu, 10 Feb 2000 18:04:26 +0000
Subject: cvs: /php4/ext/xml php_xml.h xml.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-10048@lists.php.net to get a copy of this message
sas Thu Feb 10 10:04:26 2000 EDT Modified files: /php4/ext/xml php_xml.h xml.c Log: - Fixed ^#[ ]+preprocessor directive$ constructions which break some compilers - Made php_xml.h useable without having xmltok.h/xmlparse.h in the include path Index: php4/ext/xml/php_xml.h diff -u php4/ext/xml/php_xml.h:1.6 php4/ext/xml/php_xml.h:1.7 --- php4/ext/xml/php_xml.h:1.6 Fri Dec 31 17:31:56 1999 +++ php4/ext/xml/php_xml.h Thu Feb 10 10:03:55 2000 @@ -17,13 +17,24 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xml.h,v 1.6 2000/01/01 01:31:56 sas Exp $ */ +/* $Id: php_xml.h,v 1.7 2000/02/10 18:03:55 sas Exp $ */ #ifndef _PHP_XML_H -# define _PHP_XML_H +#define _PHP_XML_H -# if HAVE_LIBEXPAT +#ifdef HAVE_LIBEXPAT +extern zend_module_entry xml_module_entry; +#define xml_module_ptr &xml_module_entry + +#else + +#define xml_module_ptr NULL + +#endif + +#if defined(HAVE_LIBEXPAT) && defined(PHP_XML_INTERNAL) + #include <xmltok.h> #include <xmlparse.h> @@ -35,7 +46,7 @@ #ifdef XML_UNICODE -# error "UTF-16 Unicode support not implemented!" +#error "UTF-16 Unicode support not implemented!" #endif typedef struct { @@ -80,9 +91,6 @@ } xml_encoding; -extern zend_module_entry xml_module_entry; -# define xml_module_ptr &xml_module_entry - enum php_xml_option { PHP_XML_OPTION_CASE_FOLDING = 1, PHP_XML_OPTION_TARGET_ENCODING, @@ -90,7 +98,7 @@ PHP_XML_OPTION_SKIP_WHITE }; -# define RETURN_OUT_OF_MEMORY \ +#define RETURN_OUT_OF_MEMORY \ php_error(E_WARNING, "Out of memory");\ RETURN_FALSE @@ -122,10 +130,6 @@ PHPAPI char *_xml_zval_strdup(zval *val); -#else /* !HAVE_LIBEXPAT */ - -# define xml_module_ptr NULL - #endif /* HAVE_LIBEXPAT */ #define phpext_xml_ptr xml_module_ptr @@ -146,7 +150,7 @@ #define XMLLS_FETCH() #endif -# endif /* _PHP_XML_H */ +#endif /* _PHP_XML_H */ /* * Local variables: Index: php4/ext/xml/xml.c diff -u php4/ext/xml/xml.c:1.44 php4/ext/xml/xml.c:1.45 --- php4/ext/xml/xml.c:1.44 Sat Feb 5 09:58:11 2000 +++ php4/ext/xml/xml.c Thu Feb 10 10:03:55 2000 @@ -17,10 +17,11 @@ +----------------------------------------------------------------------+ */ -/* $Id: xml.c,v 1.44 2000/02/05 17:58:11 andi Exp $ */ +/* $Id: xml.c,v 1.45 2000/02/10 18:03:55 sas Exp $ */ #define IS_EXT_MODULE #include "php.h" +#define PHP_XML_INTERNAL #include "php_xml.h" #include "zend_variables.h" #include "ext/standard/php_string.h"

« previous php.version4 (#10048) next »