pike.git / src / modules / FSEvents / fsevents.cmod

version» Context lines:

pike.git/src/modules/FSEvents/fsevents.cmod:179:    if(TYPEOF(ITEM(paths)[idx]) != T_STRING) continue;    sv = ITEM(paths)[idx];    push_svalue(&sv);    f_string_to_utf8(1);    str = CFStringCreateWithBytes(NULL, (const UInt8 *)(Pike_sp[-1].u.string->str), (CFIndex)Pike_sp[-1].u.string->len, kCFStringEncodingUTF8, false);    pop_stack();    CFArrayInsertValueAtIndex( (CFMutableArrayRef)THIS->_paths, cnt, str);    cnt++;    }    } -  -  pop_n_elems(args); -  -  return; +    }      /*! @decl void add_path(string path)    *! Add a path to the monitor list.    *!    *! @param path    *!    *! @note    *! this can only be called when the monitor is stopped.    */
pike.git/src/modules/FSEvents/fsevents.cmod:209:       if(path && path->len)    {    int size;    CFStringRef str;    f_string_to_utf8(1);    str = CFStringCreateWithBytes(NULL, (const UInt8 *)(Pike_sp[-1].u.string->str), (CFIndex)Pike_sp[-1].u.string->len, kCFStringEncodingUTF8, false);    size = CFArrayGetCount(THIS->_paths);    CFArrayInsertValueAtIndex( (CFMutableArrayRef)THIS->_paths, size, str);    } -  pop_stack(); +    }      /*! @decl void set_callback(function callback)    *! Sets the function that will be called when a file notification event is received.    *!    *! The method signature for the callback is:    *!    *! void event_callback(string path, int flags, int event_id)    */   PIKEFUN void set_callback(function callback)   {    assign_svalue(&THIS->callback_func, callback); -  pop_stack(); +    }      /*    * TODO we should allow the runloop to be specified.    */      /*! @decl void start()    *!    *! Requests that new events be delivered to this EventStream.    *!