PHP_FUNCTION(xmlrpc_server_add_introspection_data)
{
	zval *handle, *desc;
	xmlrpc_server_data* server;
	XMLRPC_VALUE xDesc;

	if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra", &handle, &desc) == FAILURE) {
		return;
	}

	if ((server = (xmlrpc_server_data *)zend_fetch_resource(Z_RES_P(handle), "xmlrpc server", le_xmlrpc_server)) == NULL) {
		RETURN_FALSE;
	}

	xDesc = PHP_to_XMLRPC(desc);
	if (xDesc) {
		int retval = XMLRPC_ServerAddIntrospectionData(server->server_ptr, xDesc);
		XMLRPC_CleanupValue(xDesc);
		RETURN_LONG(retval);
	}
	RETURN_LONG(0);
}
PHP_FUNCTION(xmlrpc_server_add_introspection_data)
{
	zval *handle, *desc;
	xmlrpc_server_data* server;
	XMLRPC_VALUE xDesc;

	if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra", &handle, &desc) == FAILURE) {
		return;
	}

	if ((server = (xmlrpc_server_data *)zend_fetch_resource(Z_RES_P(handle), "xmlrpc server", le_xmlrpc_server)) == NULL) {
		RETURN_FALSE;
	}

	xDesc = PHP_to_XMLRPC(desc);
	if (xDesc) {
		int retval = XMLRPC_ServerAddIntrospectionData(server->server_ptr, xDesc);
		XMLRPC_CleanupValue(xDesc);
		RETURN_LONG(retval);
	}
	RETURN_LONG(0);
}