httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laszlo <graf.las...@axis.hu>
Subject Re: using apxs
Date Fri, 25 Feb 2005 11:25:16 GMT
And I suppose that I have to include the C1_wrappers.h
in C1_wrappers.cpp. OK.

After that I also have to compile and link the C1_wrapper.cpp
into a lib file and copy it into /usr/local/apache2/lib.

Right ?
------------------
László Graf


Frédéric Bor wrote:
> In the idea, you have to do something like this:
> 
> C1_wrappers.h:
> 
> #ifdef __cplusplus
> extern "C" {
> #endif
> 
> typedef void * C1_OBJECT;
> C1_OBJECT C1_create();
> void C1_destroy(C1_OBJECT p);
> int C1_func_call(C1_OBJECT p, int param1, const char * param2);
> 
> #ifdef __cplusplus
> }
> #endif
> 
> 
> C1_wrappers.cpp:
> 
> extern "C" C1_OBJECT C1_create()
> {
>   return (C1_OBJECT) new C1;
> }
> 
> extern "C" void C1_destroy(C1_OBJECT p)
> {
>   delete (C1*)p;
> }
> 
> extern "C" int C1_func_call(C1_OBJECT p, int param1, const char * param2)
> {
>   return ((C1*)p)->func_call(param1, param2);
> }
> 
> 
> -----Message d'origine-----
> De : news [mailto:news@sea.gmane.org] De la part de Laszlo
> Envoyé : vendredi 25 février 2005 10:48
> À : dev@httpd.apache.org
> Objet : Re: using apxs
> 
> Could you give me an example of a wrapper?
> 
> Thank you.
> ------
> László Graf
> 
> 
> 
> 
> 


Mime
View raw message