Re: Any suggestion please how to transfer a struct as user data ?

"Gert Cuykens" <[email protected]>
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
On 7/19/07, Sebastian Pipping <[email protected]> wrote:
> Don't change the handlers' signatures - do a cast inside
> their bodies instead.

I am sorry if the following looks stupid but its my best shot ?

static void
characterData(void *userData, const XML_Char *s, int l)
{
 PAGE page=(PAGE)userData;
 char data[l];
 memcpy(data,s,l);
 page.add(&page,"test");
}

root@www:/var/www/trunk/cgi# gcc -g -o x xml.c -lexpat
xml.c: In function âcharacterDataâ:
xml.c:11: error: conversion to non-scalar type requested
xml.c: In function âendElementâ:
xml.c:20: error: conversion to non-scalar type requested
root@www:/var/www/trunk/cgi#
_______________________________________________
Expat-discuss mailing list
[email protected]
http://mail.libexpat.org/mailman/listinfo/expat-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.