aboutsummaryrefslogtreecommitdiff
path: root/libxsde/xsde/c/genx/genx.h
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-01-10 14:38:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-01-10 14:38:44 +0200
commit0f94fa771882136755b0fccb2837a76aab9bc0f3 (patch)
treec20daf39ed828b7e43ec11a59eaa162a182067f0 /libxsde/xsde/c/genx/genx.h
parent976ad10b40e3d3cee44c2997f5732ecdf4c92e11 (diff)
Typedef function types to help Diab C++ compiler (VxWorks)
Diffstat (limited to 'libxsde/xsde/c/genx/genx.h')
-rw-r--r--libxsde/xsde/c/genx/genx.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/libxsde/xsde/c/genx/genx.h b/libxsde/xsde/c/genx/genx.h
index 56f50b7..5bfad02 100644
--- a/libxsde/xsde/c/genx/genx.h
+++ b/libxsde/xsde/c/genx/genx.h
@@ -71,6 +71,9 @@ typedef struct genxNamespace_rec * genxNamespace;
typedef struct genxElement_rec * genxElement;
typedef struct genxAttribute_rec * genxAttribute;
+typedef void * (*genxAlloc) (void * userData, int bytes);
+typedef void (*genxDealloc) (void * userData, void* data);
+
/*
* Constructors, set/get
*/
@@ -81,9 +84,7 @@ typedef struct genxAttribute_rec * genxAttribute;
* one document at a time with a writer.
* Returns NULL if it fails, which can only be due to an allocation failure.
*/
-genxWriter genxNew(void * (*alloc)(void * userData, int bytes),
- void (* dealloc)(void * userData, void * data),
- void * userData);
+genxWriter genxNew(genxAlloc alloc, genxDealloc dealloc, void * userData);
/*
* Reset the writer object back into usable state after an error or
@@ -123,12 +124,10 @@ int genxGetPrettyPrint(genxWriter w);
* the memory; this would be appropriate in an Apache context.
* If "alloc" is not provided, genx routines use malloc() to allocate memory
*/
-void genxSetAlloc(genxWriter w,
- void * (* alloc)(void * userData, int bytes));
-void genxSetDealloc(genxWriter w,
- void (* dealloc)(void * userData, void * data));
-void * (* genxGetAlloc(genxWriter w))(void * userData, int bytes);
-void (* genxGetDealloc(genxWriter w))(void * userData, void * data);
+void genxSetAlloc(genxWriter w, genxAlloc alloc);
+void genxSetDealloc(genxWriter w, genxDealloc dealloc);
+genxAlloc genxGetAlloc(genxWriter w);
+genxDealloc genxGetDealloc(genxWriter w);
/*
* Get the prefix associated with a namespace