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

version» Context lines:

pike.git/src/modules/_Stdio/file.c:6196:    } \    prog = o->prog->inherits[SUBTYPEOF(REF)].prog; \    fun += o->prog->inherits[SUBTYPEOF(REF)].identifier_level; \    if(prog != file_program) \    Pike_error("Wrong type of object in Stdio.File->_fd\n"); \    apply_low(o, fun, args); \    }      #include "file_functions.h"    - static void file___init_ref(struct object *UNUSED(o)) - { -  SET_SVAL(REF, PIKE_T_OBJECT, 0, object, file_make_object_from_fd(-1, 0, 0)); - } -  +    #ifdef PIKE_DEBUG   void check_static_file_data(struct callback *UNUSED(a), void *UNUSED(b),    void *UNUSED(c))   {    if(file_program)    {   #define FILE_FUNC(X,Y,Z) \    if(PIKE_CONCAT(Y,_function_number)<0 || \    PIKE_CONCAT(Y,_function_number)> \    file_program->num_identifier_references) \
pike.git/src/modules/_Stdio/file.c:6454:    free_object(o);       o=file_make_object_from_fd(2, low_fd_query_properties(2)|FILE_WRITE,    fd_CAN_NONBLOCK);    ((struct my_file *)(o->storage + file_program->inherits->storage_offset))->flags |= FILE_NO_CLOSE_ON_DESTRUCT;    (void) dmalloc_register_fd(2);    dmalloc_accept_leak_fd(2);    add_object_constant("_stderr",o,0);    free_object(o);    -  START_NEW_PROGRAM_ID (STDIO_FD_REF); -  ADD_STORAGE(struct svalue); -  PIKE_MAP_VARIABLE("_fd", 0, tObjIs_STDIO_FD, PIKE_T_MIXED, 0); -  set_init_callback(file___init_ref); -  - #define FILE_FUNC(X,Y,Z) \ -  ADD_FUNCTION(X, PIKE_CONCAT(Y,_ref), Z, 0); - #define FILE_OBJ tObjImpl_STDIO_FD_REF - #include "file_functions.h" -  -  file_ref_program=end_program(); +  file_ref_program = proxy_factory(file_program, "_fd", PROG_STDIO_FD_REF_ID);    add_program_constant("Fd_ref",file_ref_program,0);       init_stdio_port();    init_stdio_sendfile();    init_stdio_udp();      #if defined(HAVE_FSETXATTR)    /*! @decl constant XATTR_CREATE    *! Used by @[setxattr] function and method to signify a pure    *! create, which will fail if the attribute already exists.