From 349ca6685b7a7947a51c886ed292ee922e76e036 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Mon, 30 Mar 2015 10:07:15 +0700 Subject: [PATCH] code: rename identifiers `with` since it is a keyword now Signed-off-by: Jean Privat --- lib/sax/helpers/sax_locator_impl.nit | 4 ++-- lib/sax/sax_parse_exception.nit | 2 +- lib/saxophonit/test_saxophonit.nit | 2 +- lib/socket/socket.nit | 2 +- lib/socket/socket_c.nit | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/sax/helpers/sax_locator_impl.nit b/lib/sax/helpers/sax_locator_impl.nit index eb04677..99d0228 100644 --- a/lib/sax/helpers/sax_locator_impl.nit +++ b/lib/sax/helpers/sax_locator_impl.nit @@ -29,7 +29,7 @@ import sax::sax_locator # redef fun start_document do # # save the location of the start of the document # # for future use. -# start_loc = new SAXLocatorImpl.with(locator) +# start_loc = new SAXLocatorImpl.from(locator) # end # end # @@ -62,7 +62,7 @@ class SAXLocatorImpl super SAXLocator # Parameters: # # * `locator`: locator to copy. - init with(locator: SAXLocator) do + init from(locator: SAXLocator) do public_id = locator.public_id system_id = locator.system_id line_number = locator.line_number diff --git a/lib/sax/sax_parse_exception.nit b/lib/sax/sax_parse_exception.nit index ae2586b..388febc 100644 --- a/lib/sax/sax_parse_exception.nit +++ b/lib/sax/sax_parse_exception.nit @@ -88,7 +88,7 @@ class SAXParseException # caused the error or warning. # * `column_number`: column number of the end of the text that # caused the error or warning. - init with(message: String, public_id: nullable String, + init with_info(message: String, public_id: nullable String, system_id: nullable String, line_number: Int, column_number: Int) do init(message) self.public_id = public_id diff --git a/lib/saxophonit/test_saxophonit.nit b/lib/saxophonit/test_saxophonit.nit index 270ed22..c4afbbf 100644 --- a/lib/saxophonit/test_saxophonit.nit +++ b/lib/saxophonit/test_saxophonit.nit @@ -50,7 +50,7 @@ class TestSaxophonit expected.document_locator = new SAXLocatorImpl expected.start_document expected.start_element("", "a", "a", new AttributesImpl) - expected.fatal_error(new SAXParseException.with( + expected.fatal_error(new SAXParseException.with_info( "The type in the closing tag (`b`) does not match the type " + "in the opening tag (`a`).", null, null, 1, 8)) expected.end_document diff --git a/lib/socket/socket.nit b/lib/socket/socket.nit index 42c7e00..681e239 100644 --- a/lib/socket/socket.nit +++ b/lib/socket/socket.nit @@ -204,7 +204,7 @@ class TCPServer closed = true return end - addrin = new NativeSocketAddrIn.with(port, new NativeSocketAddressFamilies.af_inet) + addrin = new NativeSocketAddrIn.with_port(port, new NativeSocketAddressFamilies.af_inet) address = addrin.address # Bind it diff --git a/lib/socket/socket_c.nit b/lib/socket/socket_c.nit index 44aff9e..8758cdf 100644 --- a/lib/socket/socket_c.nit +++ b/lib/socket/socket_c.nit @@ -238,7 +238,7 @@ extern class NativeSocketAddrIn `{ struct sockaddr_in* `} return sai; `} - new with(port: Int, family: NativeSocketAddressFamilies) `{ + new with_port(port: Int, family: NativeSocketAddressFamilies) `{ struct sockaddr_in *sai = NULL; sai = malloc(sizeof(struct sockaddr_in)); sai->sin_family = family; -- 1.7.9.5