Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix path processing #190

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions protoc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1164,26 +1164,22 @@ local function do_compile(self, f, ...)
end

function Parser:compile(s, name)
if self == Parser then self = Parser.new() end
local set = do_compile(self, self.parse, self, s, name)
return pb.encode('.google.protobuf.FileDescriptorSet', set)
end

function Parser:compilefile(fn)
if self == Parser then self = Parser.new() end
local set = do_compile(self, self.parsefile, self, fn)
return pb.encode('.google.protobuf.FileDescriptorSet', set)
end

function Parser:load(s, name)
if self == Parser then self = Parser.new() end
local ret, pos = pb.load(self:compile(s, name))
if ret then return ret, pos end
error("load failed at offset "..pos)
end

function Parser:loadfile(fn)
if self == Parser then self = Parser.new() end
local ret, pos = pb.load(self:compilefile(fn))
if ret then return ret, pos end
error("load failed at offset "..pos)
Expand Down
2 changes: 1 addition & 1 deletion rockspecs/lua-protobuf-0.3.4-1.rockspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package = "lua-protobuf"
version = "0.3.4-1"
source = {
url = "git://github.com/starwing/lua-protobuf.git",
url = "git+https://github.com/starwing/lua-protobuf.git",
tag = "0.3.4"
}
description = {
Expand Down
2 changes: 1 addition & 1 deletion rockspecs/lua-protobuf-scm-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package = "lua-protobuf"
version = "scm-1"

source = {
url = "git://github.com/starwing/lua-protobuf.git",
url = "git+https://github.com/starwing/lua-protobuf.git",
}

description = {
Expand Down