From bf419d265911a9b8a1c8e480ab7576eeafe49bac Mon Sep 17 00:00:00 2001 From: Rob Raux Date: Wed, 11 Sep 2013 14:36:29 +0000 Subject: [PATCH] fix global variable leaks --- lib/connection.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/connection.js b/lib/connection.js index c83ee96..df3b4e8 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -460,7 +460,7 @@ Connection.prototype.parseZ = function(buffer, length) { return msg; }; -ROW_DESCRIPTION = 'rowDescription'; +var ROW_DESCRIPTION = 'rowDescription'; Connection.prototype.parseT = function(buffer, length) { var msg = new Message(ROW_DESCRIPTION, length); msg.fieldCount = this.parseInt16(buffer); @@ -482,8 +482,8 @@ var Field = function() { this.format = null; }; -FORMAT_TEXT = 'text'; -FORMAT_BINARY = 'binary'; +var FORMAT_TEXT = 'text'; +var FORMAT_BINARY = 'binary'; Connection.prototype.parseField = function(buffer) { var field = new Field(); field.name = this.parseCString(buffer); @@ -502,7 +502,7 @@ Connection.prototype.parseField = function(buffer) { return field; }; -DATA_ROW = 'dataRow'; +var DATA_ROW = 'dataRow'; var DataRowMessage = function(name, length, fieldCount) { this.name = DATA_ROW; this.length = length;