Commits

Ruslan Osmanov committed 27dbb77

Del: removed unused callback of the event loop

  • Participants
  • Parent commits e8ed0da

Comments (0)

Files changed (5)

 		ptr->loop = NULL;
 	}
 
-	PHP_EV_FREE_FCALL_INFO(ptr->fci, ptr->fcc);
-
 	if (ptr->data) {
 		zval_ptr_dtor(&ptr->data);
 		ptr->data = NULL;
 	double                  io_collect_interval      = 0.;
 	double                  timeout_collect_interval = 0.;
 	zval                   *data                     = NULL;
-	zend_fcall_info         fci                      = empty_fcall_info;
-	zend_fcall_info_cache   fcc                      = empty_fcall_info_cache;
 
-	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|lf!z!dd",
-				&flags, &fci, &fcc, &data, 
+	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|lz!dd",
+				&flags, &data, 
 				&io_collect_interval, &timeout_collect_interval) == FAILURE) {
 		return;
 	}
 	memset(ptr, 0, sizeof(php_ev_loop));
 	ptr->loop = loop;
 
-	PHP_EV_COPY_FCALL_INFO(ptr->fci, ptr->fcc, &fci, &fcc);
-
 	if (data) {
 		Z_ADDREF_P(data);
 	}

tests/02_ev_construct_variation.phpt

 Check for constructor and factory methods' behaviour
 --FILE--
 <?php
-function cb() {
-	return FALSE;
-}
 
 $prev_data = "prev_data";
 $third_data = "new_data";
 
 // Passing data var to constructor
-$loop = new EvLoop(0, "cb", $prev_data);
+$loop = new EvLoop(0, $prev_data);
 var_dump($loop->data);
 
 // data property read/write

tests/03_ev_loop_props.phpt

 	echo "depth:";            var_dump($l->depth);
 }
 
-function cb($w, $r) {
-	return FALSE;
-}
-
 $l                   = EvLoop::defaultLoop();
 $l->data             = "ld";
 $l->io_interval      = 1.1;
 
 
 $flags               = Ev::FLAG_NOENV | Ev::FLAG_NOINOTIFY; /* 17825792 */
-$l                   = new EvLoop($flags, "cb", "data", 1.1, 1.2);
+$l                   = new EvLoop($flags, "data", 1.1, 1.2);
 $l->data             = "ld2";
 $l->io_interval      = 2.1;
 $l->timeout_interval = 2.2;
 typedef struct php_ev_loop {
 	struct ev_loop        *loop;
 	zval                  *data;                       /* User custom data attached to event loop                  */
-	zend_fcall_info       *fci;                        /* fci and fcc serve callbacks                              */
-	zend_fcall_info_cache *fcc;
 	double                 io_collect_interval;        /* If > 0, ev_io_collect_interval is called internally      */
 	double                 timeout_collect_interval;   /* If > 0, ev_timeout_collect_interval is called internally */
 	struct ev_watcher     *w;                          /* Head of linked list                                      */