state.h 443 B

12345678910111213141516171819202122
  1. #ifndef STATE_H_INCLUDED
  2. #define STATE_H_INCLUDED
  3. #include "rh.h"
  4. #include "server.h"
  5. #include "config.h"
  6. /* All state of WOE in a handy struct */
  7. struct woe_state {
  8. struct woe_server * server;
  9. struct woe_config * config;
  10. mrb_state * mrb;
  11. };
  12. #define MRB_WOE_STATE(MRB) ((struct woe_state *)(MRB->ud))
  13. #define MRB_WOE_SERVER(MRB) (MRB_WOE_STATE(MRB)->server)
  14. #define MRB_WOE_CONFIG(MRB) (MRB_WOE_STATE(MRB)->config)
  15. #endif