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

version» Context lines:

pike.git/src/modules/_Stdio/file.c:5521:    THIS_KEY->f = 0;    }   }      static void init_file_locking(void)   {    ptrdiff_t off;    START_NEW_PROGRAM_ID (STDIO_FILE_LOCK_KEY);    off = ADD_STORAGE(struct file_lock_key_storage);   #ifdef _REENTRANT -  MAP_VARIABLE("_owner",tObj,0, +  PIKE_MAP_VARIABLE("_owner",    off + OFFSETOF(file_lock_key_storage, owner_obj), -  PIKE_T_OBJECT); +  tObj, PIKE_T_OBJECT, 0);   #endif -  MAP_VARIABLE("_file",tObj,0, +  PIKE_MAP_VARIABLE("_file",    off + OFFSETOF(file_lock_key_storage, file), -  PIKE_T_OBJECT); +  tObj, PIKE_T_OBJECT, 0);    set_init_callback(init_file_lock_key);    set_exit_callback(exit_file_lock_key);    file_lock_key_program=end_program();    file_lock_key_program->flags |= PROGRAM_DESTRUCT_IMMEDIATE;   }   static void exit_file_locking(void)   {    if(file_lock_key_program)    {    free_program(file_lock_key_program);
pike.git/src/modules/_Stdio/file.c:6007:    init_stdio_stat();    init_stdio_buffer();    START_NEW_PROGRAM_ID(STDIO_FD);    ADD_STORAGE(struct my_file);      #define FILE_FUNC(X,Y,Z) \    PIKE_CONCAT(Y,_function_number) = ADD_FUNCTION(X,Y,Z,0);   #define FILE_OBJ tObjImpl_STDIO_FD   #include "file_functions.h"    -  MAP_VARIABLE("_errno", tIntPos, ID_PROTECTED, -  OFFSETOF(my_file, my_errno), PIKE_T_INT); -  MAP_VARIABLE("_read_callback",tMix,0, -  OFFSETOF(my_file, event_cbs[PIKE_FD_READ]),PIKE_T_MIXED); -  MAP_VARIABLE("_write_callback",tMix,0, -  OFFSETOF(my_file, event_cbs[PIKE_FD_WRITE]),PIKE_T_MIXED); -  MAP_VARIABLE("_read_oob_callback",tMix,0, -  OFFSETOF(my_file, event_cbs[PIKE_FD_READ_OOB]),PIKE_T_MIXED); -  MAP_VARIABLE("_write_oob_callback",tMix,0, -  OFFSETOF(my_file, event_cbs[PIKE_FD_WRITE_OOB]),PIKE_T_MIXED); -  MAP_VARIABLE("_fs_event_callback",tMix,0, -  OFFSETOF(my_file, event_cbs[PIKE_FD_FS_EVENT]),PIKE_T_MIXED); +  PIKE_MAP_VARIABLE("_errno", OFFSETOF(my_file, my_errno), +  tIntPos, PIKE_T_INT, ID_PROTECTED); +  PIKE_MAP_VARIABLE("_read_callback", +  OFFSETOF(my_file, event_cbs[PIKE_FD_READ]), +  tMix, PIKE_T_MIXED, 0); +  PIKE_MAP_VARIABLE("_write_callback", +  OFFSETOF(my_file, event_cbs[PIKE_FD_WRITE]), +  tMix, PIKE_T_MIXED, 0); +  PIKE_MAP_VARIABLE("_read_oob_callback", +  OFFSETOF(my_file, event_cbs[PIKE_FD_READ_OOB]), +  tMix, PIKE_T_MIXED, 0); +  PIKE_MAP_VARIABLE("_write_oob_callback", +  OFFSETOF(my_file, event_cbs[PIKE_FD_WRITE_OOB]), +  tMix, PIKE_T_MIXED, 0); +  PIKE_MAP_VARIABLE("_fs_event_callback", +  OFFSETOF(my_file, event_cbs[PIKE_FD_FS_EVENT]), +  tMix, PIKE_T_MIXED, 0);       fd_fd_factory_fun_num =    ADD_FUNCTION("fd_factory", fd_fd_factory,    tFunc(tNone, tObjIs_STDIO_FD), ID_PROTECTED);       fd_receive_fd_fun_num =    ADD_FUNCTION("receive_fd", NULL,    tFunc(tObjIs_STDIO_FD, tVoid), ID_PROTECTED);       ADD_FUNCTION("`_fd", fd_backtick__fd, tFunc(tNone, tObjIs_STDIO_FD), 0);
pike.git/src/modules/_Stdio/file.c:6070:    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); -  MAP_VARIABLE("_fd", tObjIs_STDIO_FD, 0, 0, PIKE_T_MIXED); +  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();    add_program_constant("Fd_ref",file_ref_program,0);