~ubuntu-branches/ubuntu/hardy/steam/hardy

« back to all changes in this revision

Viewing changes to sources/libxslt/xslt.h

  • Committer: Bazaar Package Importer
  • Author(s): Alain Schroeder
  • Date: 2006-11-21 16:03:12 UTC
  • mfrom: (2.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061121160312-nf96y6nihzsyd2uv
Tags: 2.2.31-3
Add patch to prevent inconsistent data after shutdown.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 *  along with this program; if not, write to the Free Software
15
15
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
16
 * 
17
 
 * $Id: xslt.h,v 1.1.1.1 2005/02/23 14:47:22 cvs Exp $
 
17
 * $Id: xslt.h,v 1.1.1.1 2006/03/27 12:40:19 exodusd Exp $
18
18
 */
19
19
 
20
20
 
46
46
 
47
47
#define THIS ((xslt_storage *)Pike_interpreter.frame_pointer->current_storage)
48
48
#define THAT ((xslt_storage *)Pike_interpreter.frame_pointer->current_storage)
49
 
/*#define THAT ((stylesheet_storage *)(Pike_interpreter.frame_pointer->current_storage))
50
 
 */
 
49
 
 
50
#ifndef ARG
 
51
/* Get argument # _n_ */
 
52
#define ARG(_n_) Pike_sp[-((args - _n_) + 1)]
 
53
#endif
51
54
 
52
55
typedef struct
53
56
{
54
57
    struct pike_string      *xml;
 
58
    xmlDocPtr                doc;
55
59
    struct pike_string *base_uri;
56
60
    struct pike_string *encoding;
57
61
    struct pike_string  *err_str;
85
89
    struct pike_string *language;
86
90
} stylesheet_storage;
87
91
 
 
92
typedef struct 
 
93
{
 
94
    xmlDocPtr domDoc;
 
95
    xmlNodePtr rootNode;
 
96
} dom_storage;
 
97
 
 
98
typedef struct
 
99
{
 
100
    xmlNodePtr node;
 
101
} node_storage;
 
102
 
 
103
static struct program  *dom_program = NULL;
 
104
static struct program  *node_program = NULL;
 
105
 
 
106
#define OBJ2_NODE(_o) ((node_storage *)get_storage(_o, _o->prog))
 
107
#define OBJ2_DOM(_o) ((dom_storage *)get_storage(_o, _o->prog))
 
108
#define NEW_NODE() clone_object(node_program, 1)
 
109
 
 
110
#define CHECK_NODE(_o) do { char * _x; \
 
111
  _x  = get_storage(_o, _o->prog); \
 
112
  if ( _x == NULL ) Pike_error("bad argument: expected libxslt.Node");\
 
113
  } while ( 0 );
 
114
 
 
115
#define CHECK_DOM(_o) do { char * _x; \
 
116
  _x  = get_storage(_o, _o->prog); \
 
117
  if ( _x == NULL ) Pike_error("bad argument: expected libxslt.DOM");\
 
118
  } while ( 0 );
 
119
 
 
120
#define THISDOM ((dom_storage*)Pike_fp->current_storage)
 
121
#define THISNODE ((node_storage*)Pike_fp->current_storage)
 
122
 
88
123
 
89
124
#ifndef ADD_STORAGE
90
125
/* Pike 0.6 */