Skip to content

Commit ced8e51

Browse files
committed
Ported WDDX module.
1 parent b64eaf7 commit ced8e51

File tree

6 files changed

+935
-0
lines changed

6 files changed

+935
-0
lines changed

ext/wddx/Makefile.am

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# $Id$
2+
3+
INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
4+
noinst_LIBRARIES=libphpext_wddx.a
5+
libphpext_wddx_a_SOURCES=wddx.c
6+

ext/wddx/config.h.stub

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* define if you want to use the wddx extension */
2+
#define HAVE_WDDX 0

ext/wddx/config.m4

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
dnl $Id$
2+
dnl config.m4 for extension wddx
3+
4+
AC_MSG_CHECKING(whether to include WDDX support)
5+
AC_ARG_WITH(wddx,
6+
[ --with-wddx Include WDDX support],[
7+
if test "$withval" = "yes"; then
8+
if test "${with_xml+set}" != "set" -o "$with_xml" = "no"; then
9+
AC_MSG_ERROR(WDDX requires --with-xml)
10+
else
11+
AC_DEFINE(HAVE_WDDX, 1)
12+
AC_MSG_RESULT(yes)
13+
PHP_EXTENSION(wddx)
14+
fi
15+
else
16+
AC_MSG_RESULT(no)
17+
fi
18+
],[
19+
AC_MSG_RESULT(no)
20+
])

ext/wddx/php_wddx.h

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
+----------------------------------------------------------------------+
3+
| PHP HTML Embedded Scripting Language Version 3.0 |
4+
+----------------------------------------------------------------------+
5+
| Copyright (c) 1997-1999 PHP Development Team (See Credits file) |
6+
+----------------------------------------------------------------------+
7+
| This program is free software; you can redistribute it and/or modify |
8+
| it under the terms of one of the following licenses: |
9+
| |
10+
| A) the GNU General Public License as published by the Free Software |
11+
| Foundation; either version 2 of the License, or (at your option) |
12+
| any later version. |
13+
| |
14+
| B) the PHP License as published by the PHP Development Team and |
15+
| included in the distribution in the file: LICENSE |
16+
| |
17+
| This program is distributed in the hope that it will be useful, |
18+
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
19+
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20+
| GNU General Public License for more details. |
21+
| |
22+
| You should have received a copy of both licenses referred to here. |
23+
| If you did not, or have any questions about PHP licensing, please |
24+
| contact core@php.net. |
25+
+----------------------------------------------------------------------+
26+
| Authors: Andrey Zmievski <andrey@ispi.net> |
27+
+----------------------------------------------------------------------+
28+
*/
29+
30+
/* $Id$ */
31+
32+
#ifndef _WDDX_H
33+
#define _WDDX_H
34+
35+
#if HAVE_WDDX
36+
37+
#include "xml/xmlparse.h"
38+
39+
extern int php_minit_wddx(INIT_FUNC_ARGS);
40+
41+
extern zend_module_entry wddx_module_entry;
42+
#define wddx_module_ptr &wddx_module_entry
43+
44+
PHP_FUNCTION(wddx_serialize_value);
45+
PHP_FUNCTION(wddx_serialize_vars);
46+
PHP_FUNCTION(wddx_packet_start);
47+
PHP_FUNCTION(wddx_packet_end);
48+
PHP_FUNCTION(wddx_add_vars);
49+
PHP_FUNCTION(wddx_deserialize);
50+
51+
#else
52+
53+
#define wddx_module_ptr NULL
54+
55+
#endif /* HAVE_WDDX */
56+
57+
#define phpext_wddx_ptr wddx_module_ptr
58+
59+
#endif /* !_WDDX_H */

ext/wddx/setup.stub

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# $Source$
2+
# $Id$
3+
4+
define_option with-wddx 'wddx support?' yesnodir no \
5+
' Whether to build the wddx extension.'
6+

0 commit comments

Comments
 (0)