Commits

Ruslan Osmanov committed da26604

Del: php_event_bevent_t's stream_id member

Comments (0)

Files changed (3)

classes/buffer_event.c

 
 	bev->bevent = bevent;
 
-	if (ppzfd) {
-		/* lval of ppzfd is the resource ID */
-		bev->stream_id = Z_LVAL_PP(ppzfd);
-		zend_list_addref(Z_LVAL_PP(ppzfd));
-	} else {
-		/* Should be assigned in bufferevent_socket_connect() later
-		 * (by means of bufferevent_getfd()) */
-		bev->stream_id = -1;
-	}
-
 	bev->self = zself;
 	Z_ADDREF_P(zself);
 
 		PHP_EVENT_FETCH_BEVENT(b[i], zbev[i]);
 
 		b[i]->bevent    = bevent_pair[i];
-		b[i]->stream_id = -1;
 
 		add_next_index_zval(return_value, zbev[i]);
 	}
 		RETURN_FALSE;
 	}
 
-	bev->stream_id = bufferevent_getfd(bev->bevent);
-
-	PHP_EVENT_ASSERT(bev->stream_id >= 0);
-
 	RETVAL_TRUE;
 }
 /* }}} */
 	}
 #endif
 
-	bev->stream_id = bufferevent_getfd(bev->bevent);
-
-	/*
-	It may not work with evdns
-	if (bev->stream_id < 0) {
-		RETURN_FALSE;
-	}
-	 PHP_EVENT_ASSERT(bev->stream_id >= 0);
-	*/
-
 	RETVAL_TRUE;
 #endif
 }
 	}
 	bev->bevent = bevent;
 
-	bev->stream_id = -1;
-
 	bev->self = return_value;
 	Z_ADDREF_P(return_value);
 }
 	}
 	bev->bevent = bevent;
 
-	/* lval of ppzfd is the resource ID */
-	bev->stream_id = Z_LVAL_PP(ppzfd);
-	zend_list_addref(Z_LVAL_PP(ppzfd));
-
 	bev->self = return_value;
 	Z_ADDREF_P(return_value);
 }
 		PHP_EVENT_FREE_FCALL_INFO(b->fci_write, b->fcc_write);
 		PHP_EVENT_FREE_FCALL_INFO(b->fci_event, b->fcc_event);
 
-		if (b->stream_id >= 0) { /* stdin fd == 0 */
-			zend_list_delete(b->stream_id);
-		}
-
 #if 0
 		if (b->self) {
 			zval_ptr_dtor(&b->self);
 	PHP_EVENT_OBJECT_HEAD;
 
 	struct bufferevent    *bevent;
-	int                    stream_id;   /* Resource ID of the file descriptor. -1 if none */
 	zval                  *self;        /* Object itself. For callbacks                   */
 	zval                  *data;        /* User custom data                               */
 	zval                  *input;       /* Input buffer */