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

version» Context lines:

pike.git/src/modules/_Stdio/socket.c:662:    */   static void port_set_backend (INT32 args)   {    struct port *p = THIS;    struct Backend_struct *backend;       if (!args)    SIMPLE_TOO_FEW_ARGS_ERROR ("Stdio.Port->set_backend", 1);    if (TYPEOF(Pike_sp[-args]) != PIKE_T_OBJECT)    SIMPLE_BAD_ARG_ERROR ("Stdio.Port->set_backend", 1, "object(Pike.Backend)"); -  backend = (struct Backend_struct *) -  get_storage (Pike_sp[-args].u.object, Backend_program); +  backend = get_storage (Pike_sp[-args].u.object, Backend_program);    if (!backend)    SIMPLE_BAD_ARG_ERROR ("Stdio.Port->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);
pike.git/src/modules/_Stdio/socket.c:767:       set_init_callback(init_port_struct);    set_exit_callback(exit_port_struct);       port_program = end_program();    add_program_constant( "_port", port_program, 0 );   }      int fd_from_portobject( struct object *p )   { -  struct port *po = (struct port *)get_storage( p, port_program ); +  struct port *po = get_storage( p, port_program );    if(!po) return -1;    return po->box.fd;   }