Skip to content
  • Aaron Jones's avatar
    All modules: Initialisation dependency requirements · 2ed940b0
    Aaron Jones authored
    When a module adds a command to a named service, depend on the module
    that adds that service. Otherwise, service_named_bind_command() just
    does nothing if the service doesn't exist, so make sure it exists
    first.
    
    Likewise, the dependency and conflict macros return from mod_init()
    without doing any cleanup. The mod_deinit() function does not get
    called if mod_init() fails -- so mod_init() needs to do any cleanup
    should it fail. This means these macros need to be first.
    
    Finally, these macros expand to an if() block, so they don't need a
    semicolon on the end; they are not function calls or do-while loops.
    2ed940b0