Branch: Tag:

2015-05-18

2015-05-18 16:10:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Stdio.Port: Added some missing documentation of query_fd().

Also moved the implementation to be closer to the rest of the functions.

724:    default_backend));   }    + int fd_from_portobject( struct object *p ) + { +  struct port *po = get_storage( p, port_program ); +  if(!po) return -1; +  return po->box.fd; + }    -  + /*! @decl int query_fd() +  *! +  *! Returns the file descriptor number associated with this object. +  */ + static void port_query_fd(INT32 UNUSED(args)) + { +  push_int(fd_from_portobject(Pike_fp->current_object)); + } +  +    static void init_port_struct(struct object *o)   {    INIT_FD_CALLBACK_BOX(&THIS->box, NULL, o, -1, 0, got_port_event, 0);
738:    unhook_fd_callback_box (&THIS->box);    /* map_variable takes care of id and accept_callback. */   } -  - int fd_from_portobject( struct object *p ) - { -  struct port *po = get_storage( p, port_program ); -  if(!po) return -1; -  return po->box.fd; - } -  - static void port_query_fd(INT32 UNUSED(args)) - { -  push_int(fd_from_portobject(Pike_fp->current_object)); - } +    /*! @endclass    */