You're talking about Apache hooks?  The ap_process_connection() and process_connection hook is not same. Anyway, it is too fast to giveup Apache hook macro^^;
 
Hook macro is in the APU Hooks' section. Go there and copy&paste the macro, then write a simple test code in your own.
 
Make use of GCC's -E option or --save-temps option. You can see a macro result in screen or file in /tmp directory.
 
I was very surprised when I looked at Hook macro. If you understand the Hook macro, surprising perhaps :)
 
ps) Hook is most likely same with OOP event.


Except that it isn't REALLY defined there. The use of all these macros
is giving me a headache. There are a number of papers out there on why
this kind of macro (ab)use is bad, mainly because it makes it impossible
to understand the code.

server/connection.c has this:

AP_IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec
*c),(c),DECLINED)

Well what the heck does that do? There's no function body defined
there. I'm guessing that macro does some tricks to achieve something
like polymorphism in C, binding an object to a set of functions that
should be called in a given event. I can't see what function is being
bound to the process_connection event though.

When I looked up the definition of this macro, it is itself defined
using another macro. My eyes have now gone crossed. Maybe I'll try to
understand these evil mac ros later.

__________________________________________________
두 유 야후!?
스팸때문에 짜증나세요? 야후! 메일의 스팸 차단 기술로 메일을 보호합니다
http://mail.yahoo.co.kr

Reply via email to