pike.git / src / modules / _Stdio / socket.c

version» Context lines:

pike.git/src/modules/_Stdio/socket.c:471: Inside #if defined(HAVE_SYS_UN_H)
  }      #endif /* HAVE_SYS_UN_H */      /*! @decl void close()    *!    *! Closes the socket.    */   static void port_close (INT32 args)   { -  pop_n_elems (args); +     do_close (THIS);   }      /*! @decl void create(int|string port, void|function accept_callback, @    *! void|string ip)    *! @decl void create("stdin", void|function accept_callback)    *!    *! When called with an int or any string except @expr{"stdin"@} as    *! first argument, this function does the same as @[bind()] would do    *! with the same arguments.
pike.git/src/modules/_Stdio/socket.c:499:    */   static void port_create(INT32 args)   {    if(args)    {    if(TYPEOF(Pike_sp[-args]) == PIKE_T_INT ||    (TYPEOF(Pike_sp[-args]) == PIKE_T_STRING &&    (Pike_sp[-args].u.string->len != 5 ||    strcmp("stdin",Pike_sp[-args].u.string->str))))    { -  port_bind(args); /* pops stack */ +  port_bind(args);    return;    }else{    struct port *p = THIS;       if(TYPEOF(Pike_sp[-args]) != PIKE_T_STRING)    SIMPLE_TOO_FEW_ARGS_ERROR("create", 1);       /* FIXME: Check that the argument is "stdin". */       do_close(p);    change_fd_for_box (&p->box, 0);       if(fd_listen(p->box.fd, 16384) < 0)    {    p->my_errno=errno;    }else{    if(args > 1) assign_accept_cb (p, Pike_sp+1-args);    }    }    } -  pop_n_elems(args); +    }      extern struct program *file_program;      static int port_fd_factory_fun_num = -1;   static void port_fd_factory(INT32 args)   {    pop_n_elems(args);    push_object(clone_object(file_program, 0));   }
pike.git/src/modules/_Stdio/socket.c:694:    SIMPLE_BAD_ARG_ERROR ("set_backend", 1, "object(Pike.Backend)");    backend = get_storage (Pike_sp[-args].u.object, Backend_program);    if (!backend)    SIMPLE_BAD_ARG_ERROR ("set_backend", 1, "object(Pike.Backend)");       if (p->box.backend)    change_backend_for_box (&p->box, backend);    else    INIT_FD_CALLBACK_BOX (&p->box, backend, p->box.ref_obj,    p->box.fd, 0, got_port_event, 0); -  -  pop_n_elems (args - 1); +    }      /*! @decl Pike.Backend query_backend()    *!    *! Return the backend used for the accept callback.    *!    *! @seealso    *! @[set_backend]    */   static void port_query_backend (INT32 args)